'*******************************
'                              '
'  Andy's editor include file  '
'      for Version 46.4        '
'       November, 2020         '
'                              '
'*******************************

'AUTODEFINE "OFF"
$INCLUDE "windowssdk.inc"
$INCLUDE "commctrl.inc"
$INCLUDE "richedit.inc"
$INCLUDE "stdio.inc"
$INCLUDE "ctl.inc"

'Buffer size
const TBuff = 1048576

const EDIT_1 = 10
const Check1 = 15
const TextBlock1 = 500
const TextBlock2 = 501
const TextBlock3 = 502
const TextBlock4 = 503
const ShowCode = 504 
const ShowBlock1 = 505 
const ShowBlock2 = 506
const ShowBlock3 = 507 
'10
const ShowBlock4 = 508
const LineStatic = 509
const CopySubButton = 510
const DeleteSubButton = 511
const CopySubBlockButton = 512
const CopyWinButton = 520
const DeleteWinButton = 521
const CopyWinBlockButton = 522
const DeleteBlockButton = 523
const CopyBlockButton = 524
'20
const MoveSubButton = 525
const MoveWinButton = 526
const BlockJumpButton = 527
const SnapshotButton = 528
const SaveAsButton = 529
const BookDelAll = 530
const ListView8 = 540
const ListView10 = 541

const SelectJump = 543
'30

const Combo10 = 545
const CaseJump = 546
const SelectStatic = 547
const CaseStatic = 548
const Combo12 = 549
const EDIT_2 = 550
const EDIT_4 = 551
const Combo14 = 552
const CaseFind = 553
'40
const Combo16 = 554
const CaseDelete = 555
const CaseFindStatic = 556
const LinePosEdit = 557
const LineCharEdit = 558
const nwPosEdit = 559
const EditPosEdit = 560
const LinePosStatic = 561
const LineCharStatic = 562
const nwPosStatic = 563
'50
const EditPosStatic = 564
const InsertStatic = 565
const KeyWordStatic = 566
const KeyWordResults = 567
const KeyFind = 568
const ListViewResult = 570
const KeyDelete = 571
const CodeWordEdit1 = 572
const CodeWordEdit2 = 573
const CodeWordSearch = 574
'60
const CodeWordStatic = 575
const CodeWordAnd = 576
const CodeWordOr = 577
const CodeWordDelete = 578
const CodePhraseEdit = 579
const CodePhraseSearch = 580
const CodePhraseStatic = 581
const CodePhraseExact = 582
const CodePhraseWords = 583
const ShowSubButton = 584
'70
const ShowWindowButton = 585
const ShowBookMarksButton = 586
const ShowCasesButton = 587
const PhraseDeleteButton = 588
const NavForwardButton = 589
const NavBackButton = 590
const NavDeleteButton = 591
const NavButton = 592
const NavBackGrey = 593
const NavForwardGrey = 594
'80
const Combo18 = 595
const ReplaceStatic = 596
const ReplaceEdit = 597
const ReplaceSearch = 598
const ReplaceWhat = 599
const ReplaceWith = 600
const MaxWordsStatic = 601
const EDIT_11 = 602
const EDIT_111 = 603
const BUTTON_44 = 604
'90
const CloseButton = 605
const FileTab1 = 606
const FileTab2 = 607
const FileTab3 = 608
const FileTab4 = 609
const MinButton = 610
const BackupButton = 611
const NewButton = 612
const FileTab5 = 613
const FileTab6 = 614
'100
const CogButton = 701
const ClearSubs = 702
const ClearWins = 703
const ReplaceButton = 704
const GoReplace = 705
const TopButton = 706
const BottomButton = 707
const IncludeStatic = 708
const IncludeGo = 709
const ClearButton = 710
'110
const BinButton = 711
const AutoButton = 712
const SelectAllButton = 713
const ClearAllButton = 714
const Edit_10 = 715
const ColourButton = 716
const Debug1 = 717
const Debug2 = 718
const Debug3 = 719
const DebugCheck = 770
'120
const WordStatic = 771
const WordNumberEdit = 772
const PosStatic = 773
const PosEdit = 774
const CharPosStatic = 775
const CharPosEdit = 776
const LineNumberStatic = 777
const LineNumberEdit = 778
const CoorCheck = 779
const SubSearchButton = 781
const SearchCheck = 782
const ListViewFonts = 783
'131
const NoJumpR = 876 + 1
const MainTimer = 880
const ConstantsButton = 881
const BeginsWith = 882
const InSubName = 883
const StopGoButton = 884
const CodePhrase = 885
const StopButton = 886
const FindFirst = 887
const FindAll = 888
const FindLast = 889
const CaseButton = 890
const CaseSearchButton = 891
const CaseCase = 892
const GoControl = 893
const GoCase = 894
const FilterBy = 895
const ControlName = 896
const WindowStatic = 897
const TypeStatic = 898
const TotalStatic = 899
const ExcludeStatics = 900
const SearchStatic = 901
const ScrollBar = 902
const KeyWordEdit = 903
const RichEdit = 904
const ReLoadButton = 905
const KeepHandy = 906
const HandyControls = 907
const AddNavCheck = 908
const Edit_1111 = 909
const BUTTON_444 = 910 
const NavDeleteAllButton = 911 
const RememberMe = 912
const RememberStatic = 913
const DupPlaces = 914
const ClearOut = 915
const FindControl = 916
const FindControlEdit = 917
const CopyAllButton = 918
const IncludeSubs = 919
const ResultsText = 920
const ExitButton = 780

def lastff[LF_FULLFACESIZE]:istring
def lwin:window
def lcid:int
def want:LOGFONT

type ENUMLOGFONTEX
     def elfLogFont:LOGFONT
     def elfFullName[LF_FULLFACESIZE]:istring
     def elfStyle[LF_FACESIZE]:istring
     def elfScript[LF_FACESIZE]:istring
endtype
declare EnumFontFamExProc(lpelfe:pointer /* ENUMLOGFONTEX 2000/XP Can be ENUMLOGFONTEXDV */,lpntme:pointer /*NEWTEXTMETRICEX*/,FontType:uint,lParam:int),int

'Program version.
STRING Version = "V16.00"
STRING IniStr = REGGETSTRING("HKEY_CURRENT_USER\Volatile Environment","LOCALAPPDATA")
STRING ActualPath
IF INSTR(GETSTARTPATH,"\\bin") = 0
   ActualPath = GETSTARTPATH + "\\bin\\"
ELSE
   ActualPath = GETSTARTPATH
ENDIF

'Used only for precision timing...
DECLARE CDECL EXTERN _memset(dst AS POINTER,value AS CHAR,count AS UINT)

'**********************************************************
'      A pointer array to store all IWB keywords, "p"     '
'**********************************************************

CONST WordsPerLine = 50000
CONST CharactersPerLine = 512
int IWBkeywords = 1665

TYPE TextPline
     STRING TheText
ENDTYPE
POINTER tpl
tpl = NEW(TextPline,20000)
SETTYPE tpl,TextPline

POINTER sRange
TYPE tagPOINT
     UINT High 'Horizontal scroll position
     UINT Low  'Vertical scroll position
ENDTYPE
sRange = NEW(tagPOINT,5)
SETTYPE sRange,tagPOINT

POINTER sRangeC
TYPE tagPOINT
     UINT High 'Horizontal scroll position
     UINT Low  'Vertical scroll position
ENDTYPE
sRangeC = NEW(tagPOINT,5)
SETTYPE sRangeC,tagPOINT

TYPE MYUDT
     STRING words
ENDTYPE
POINTER p
p = NEW(MYUDT,IWBkeywords)
SETTYPE p,MYUDT

TYPE MYUDTA
     INT Colour
     STRING Font
     INT Size
     INT Weight
     UINT Style
ENDTYPE
POINTER Attrib
Attrib = NEW(MYUDTA,IWBkeywords)
SETTYPE Attrib,MYUDTA

TYPE CHARFORMAT
     UINT		cbSize
     DWORD		dwMask
     DWORD		dwEffects
     LONG		yHeight
     LONG		yOffset
     COLORREF	crTextColor
     BYTE		bCharSet
     BYTE		bPitchAndFamily
     CHAR	   szFaceName[LF_FACESIZE]
ENDTYPE
CHARFORMAT cf

POINTER cr
TYPE _charrange
      LONG cpMin
      LONG cpMax
ENDTYPE

cr = NEW(_charrange,5)
SETTYPE cr,_charrange

type lpRect
     LONG left
     LONG top
	  LONG right
     LONG bottom
endtype
type MapDialogRect
     HWND   hDlg
     LPRECT lpRect
endtype

POINTER lp
TYPE Linestart
     INT LineS
ENDTYPE

lp = NEW(Linestart,100000)
SETTYPE lp,Linestart

INT Orange = RGB(255,140,0)
INT Blue = RGB(0,0,255)
INT Green = RGB(0,102,0)
INT BlueButton = RGB(46,156,253)
INT DarkGreen = RGB(34,139,34)
INT Red = RGB(255,0,0)
INT Grey = RGB(105,105,105)
INT Black = RGB(0,0,0)
INT Purple = RGB(148,0,211)
INT Claret = RGB(128,0,0)
INT Coral = RGB(255,69,0)
int KeyWordColourAt = Orange
int KeyWordColourDollar = Grey
int KeyWordColourAtoZ = Blue
int KeyWordColourOther = Grey
int KeyWordColourVariables = Red

INT RoundBrackets = Red
INT SquareBrackets = Claret
INT CommaColor = Blue
int LocalSubColour = Claret
int LocalWinColour = Claret
int LocalCaseColour = Claret	'rgb(47,79,79)
int CommentColour = Green
int QuotesColour = Purple
int HexColour = Grey
int TextColour = Black

int br[300]
int bg[300]
int bb[300]

int lvposStore = 0
int Scount = 0
int StopGo = 0
int Toggle = 0
int count = 0
int ePos = 0
int Rlen = 0
int CaseFound = 0
int ControlId = 0
int InsertAt = 0 
int SpacePosX = 0
int AllMatched = 0
int SearchEnabled = 0
int ToolTipsTotal = 0
INT CodeWordAndV = 1
INT CodeWordOrV = 0
int StoppedAt = 0
int CodeSearchType = 0
int lncount = 0
string CodeWord1 = ""
string CodeWord2 = "" 
int OnePercent = 0
int wW = 0
int wH = 0
int DetailsAlreadyDone = 0
int DoingRebuild = 0
int PercentDone = 0
int PercentCount = 0
int FindFirstV = 0
int FindAllV = 0
int FindLastV = 0
int RememberV = 0
int AndV = 0
int OrV = 0
int LastRedoStart = 0
int LastRedoEnd = 0
int Assembly = 0
int DupPlacesV = 0
int DefaultSet = 0
int NewColour = 0
int Spelling = 0
int SpellingV = 0
int rcDepth = 0
int CheckLocalSubs = 0
int CheckLocalWindows = 0
int SearchCheckV = 0
int CoOn = 0
int DebugOn = 0
int AutoCompleteKeyWords = 0
int UndoKey    = 0
int RedoKey    = 0
int UndoAllKey = 0
int RedoAllKey = 0
int ToolTips = 0
int TimerSpeed1 = 0
int ReIndexSpeed = 0
int AutoSaveOnExit = 0
int AutoSaveOnClose = 0
int WheelScrollLines = 0
int AutoJumpTo = 0
int ConfirmMessage = 0
int MaxTabs = 0
INT ClickedColumn,LastClickedColumn,SortAscDesc,ColumnChanged
uint ScreenColour = 0
Uint WindowBackColour = 0
string OldWin = ""
string OldType = ""
string SpellWord = ""
string DefaultSelect = ""
string WordToLookUp = ""
string CurrentSub = ""
string FilterList = ""
string OldProgName = ""
string Purge[10000]

type Undos2
     int Pos[1000]
     int PosBK[1000]
     int PosAK[1000]
     int LineNo[1000]
     int Offset[1000]
     string Typed[1000]
     string Was[1000]
     int Colour[1000]
     int Press[1000]
     int Length[1000]
     int DeleteLine[1000]
     int NewLine[1000]
     int FirstVis[1000]
endtype
def Undo2[6]as Undos2

type Redos2
     int Pos[1000]
     int PosBK[1000]
     int PosAK[1000]
     int LineNo[1000]
     int Offset[1000]
     string Typed[1000]
     string Was[1000]
     int Colour[1000]
     int Press[1000]
     int Length[1000]
     int DeleteLine[1000]
     int NewLine[1000]
     int FirstVis[1000]
endtype
def Redo2[6]as Redos2

Type UndoBlockText
     int UndoCount[1000]
     int StartPos[1000]
     int EndPos[1000]
     int Length[1000]
     int LineNo[1000]
     istring BlockText[50000,1000]
endtype
def UndoBlock[6]as UndoBlockText

Type RedoBlockText
     int UndoCount[1000]
     int StartPos[1000]
     int EndPos[1000]
     int Length[1000]
     int LineNo[1000]
     istring BlockText[50000,1000]
endtype
def RedoBlock[6]as RedoBlockText

int Undo2Count[6] = 0
int Redo2Count[6] = 0

int NavStoreCount[6] = 0
string NavStore1[10000] 
string NavStore2[10000]
string NavStore3[10000]
string NavStore4[10000]
string NavStore5[10000]
string NavStore6[10000]

int BookStoreCount[6] = 0
string BookStore1[1000] 
string BookStore2[1000]
string BookStore3[1000]
string BookStore4[1000]
string BookStore5[1000]
string BookStore6[1000]

int b1 = 0
int IncAcross = 0
int PrevX = 0
int NewFile = 0
int AdjustPos = 0
int TheFontSize = 0
int NewFileCount = 0
int StoreLastTabWidth = 0
int InitialTab = 1
int CharPos = 0
int PrevEditPos = 0
int PrevCharPos = 0
int PrevWordNumber = 0
int CloseProgram = 0
int SaveSubDelete = 0
int NoJumpRV = 0
int UndoDec = 0
int WordLen = 0
int WordStart = 0
int WordEnd = 0
int WordStartRC = 0
int WordEndRC = 0
int PasteKey = 0
int EndSubFound = 0
int EndWinFound = 0
int bz,DelZ
int LineLenZ 
int CheckWordZ1 = 0
int PositionZ = 0
int AddToUndo = 0
int DeleteOnce = 0
int LButtonDown = 0
int OldDragLine = 0
int LineDeleteCount = 0
int Typing = 0
int RebuildCount = 0
int ManualChange = 0
int StartCutPos = 0
int DoneBefore = 0
int CtrlDown = 0
int PasteOn = 0
int NoNotify = 0
int textVV = 0
int RetCount = 0
int lvcountIn = 0
int WordNumber = 0
int SubDisplayed[10] = 0
int WinDisplayed[10] = 0
int BackSpacePressed = 0
istring DelStore[512] = ""
string TheWord = ""
string CharTyped = ""
string Line2$ = ""
string Line4$ = ""
string UndoWord = ""
string NewFileName = ""
string NewFontName = ""
string OldFontName = ""
uint hfont
hfont = CreateFontA(20,0,0,0,0,0,0,0,1,0,0,0,2,"Arial")
uint hwndTooltip[100]

'LOGFONT lf
int AutoCompleteStore = AutoCompleteKeyWords
int FromLine = 0
int lv2Selected = 0
int mod = 0
int CloseDown = 0
int NoColour = 0
int CapsOn = 0
int Confirm = 0
int ProgCount = 0
int OnTab = 0
int PageDown = 0
int WheelPos = 0
int Restoring = 0
int OnBlock = 0
int ScrollPoint = 0
int NoNewFile = 0
int crtl = 0
int Skip = 0
int OldsRange = 0
int StartUpAt = 1
int WordCountEdit = 0
int DelConfirm = 0
int Once = 0
int mc = 0
int ToAdd = -1
int TextJump = 1
int eventMask = 0
int StorecLine = 0
int MouseWheel = 0
int OldLines = 0
int CurrentLines = 0
int CurrentLinesThen = 0
int Modified = 0
int lvX = 0
int lvY = 0
int length2 = 0
int InsertPoint = 0
int char_index = 0
int MinMax1 = 0
int MinMax2 = 0
int TabTaken = 0
int Tab1Loaded = 0
int Tab2Loaded = 0
int Tab3Loaded = 0
int Tab4Loaded = 0
int Tab5Loaded = 0
int Tab6Loaded = 0
int EndButtons = 1297
uint BackColour = rgb(231,222,231)

file file1
istring buffer[TBuff]
istring buffer1[TBuff]
istring buffer2[TBuff]
istring buffer3[TBuff]
istring buffer4[TBuff]
istring buffer5[TBuff]
istring buffer6[TBuff]
istring CutLine[TBuff] = ""
string RecentProgs[10] = ""
string RecentName[10] = ""
string Col1[5000] = ""
string Col2[5000] = ""
string Col3[5000] = ""
string OldFirstLine = ""
string OldLastLine = ""
string StoreFirstLine = ""
string StoreLastLine = ""
string Block1 = ""
string Block2 = ""
string BlockIn = ""
string BlockOld = ""
string RealTabName = ""
string StoreSubName = ""
string BookMarkDesc = ""
string TextIn1,TextIn2,TextInName
string NewEdit = ""
string BackupDesc = ""
double dOnLine = 0.00
int OnLine = 1
int ScrollBarVisible = 1
int FirstVisLine = 1
int PrevFirstVisLine = 1
int DoingOpen = 0
int MoveAmount = 0
int LastUpLine = 0
int SingleLine = 0
int Colouring = 0
int KeyUp = 0
int KeyDownn = 0
int lStart = 0
int lStop = 0
int crsCount = 0
int xStart = 0
int xEnd = 0
int Fvis = 0
int ttx = 0
int ReplaceNow = 0
int DelFound = 0
int CommentsOn = 0
int ColourThis = 0
int SwitchIn = 0
int Store1 = 0
int Store2 = 0
int cLine = 0
int OldLine = 0
int OldFirstLineX = 0
int StoreLine = 0
int StoreCharPos = 0
int MoveToPosition = 0
int NavPos = 0
int NavMax = 0
int Page = 1

pointer Chars
type Charrange
     uint cpMin 'Start position
     uint cpMax 'End position
endtype
Chars = NEW(Charrange,5)
settype Chars,Charrange

pointer mMouse
type mouse_event
     int dwFlags
     int dx
     int dy
     int dwData
     uint dwExtraInfo
endtype
mMouse = NEW(mouse_event,5)
settype mMouse,mouse_event
const ES_UPPERCASE = 0x0008
Const ENM_MOUSEEVENTS = 0x00020000
const EM_SETREADONLY = 0xCF
const EN_CHANGE = 0x300
CONST WM_USER = 0x400
CONST EM_HIDESELECTION = (WM_USER+63)
const ES_SUNKEN = 0x00004000
CONST WM_USER = 0x400
const WM_MOUSEWHEEL = 0x020A
const WM_VSCROLL = 0x115
const EM_HIDESEL = 19
Const LVM_FIRST  = &H1000
Const LVM_GETSELECTIONMARK  = (LVM_FIRST + 66)
Const LVM_GETNEXTITEM = (LVM_FIRST + 12)
Const LVM_GETSELECTEDCOUNT = (LVM_FIRST + 50)

const SelectEnd = 544
const Combo8 = 542
POINTL pt

int DelCount = 0
int ScrollStart = 0
int EndRange = 0
int LineIsAt  = 0
int Numlength = 0
int Correction = 0
INT mask = 0
int ttt = 0
int ppos = 0
int NoUpdate = 0
int ToBlock = 0
int MaxLines = 0
int StartAt = 0
int AcrossX = 0
int PrevAcrossX = 0
int DownY = 0
int FirstChar = 0
int TimerStarted = 0
int CodePhraseExactV = 0
int CodePhraseWordsV = 0
int CodePhraseV = 0
int CodePhraseLikeV = 0

const SB_VERT = 1

TYPE MYUDT2
     STRING aWord
     INT StartPos
     INT EndPos
     INT LineNo
     INT Coloured
     INT Length
ENDTYPE
POINTER w
w = NEW(MYUDT2,WordsPerLine)
SETTYPE w,MYUDT2

TYPE MYUDT22
     STRING aWord
     INT StartPos
     INT EndPos
     INT LineNo
     INT Coloured
     INT Length
ENDTYPE
POINTER m
m = NEW(MYUDT22,WordsPerLine)
SETTYPE m,MYUDT22

TYPE MYUDT240
     STRING aWord
     int Matched
ENDTYPE
POINTER s
s = NEW(MYUDT240,100)
SETTYPE s,MYUDT240

TYPE MYUDT241
     STRING Del
     int Matched
ENDTYPE
POINTER e
e = NEW(MYUDT241,1000)
SETTYPE e,MYUDT241

TYPE MYUDT242
     STRING Del
     int Matched
ENDTYPE
POINTER et
et = NEW(MYUDT242,1000)
SETTYPE et,MYUDT242

TYPE MYUDT3
     STRING Delimiter
     INT Colour
ENDTYPE
POINTER d
d = NEW(MYUDT3,WordsPerLine)
SETTYPE d,MYUDT3

'**********************************************************
'                  Keyword index pointers                 '
'**********************************************************

'Non @ keywords
POINTER pIndex
TYPE MYUD4
     INT Entry[100,100,35]
ENDTYPE
pIndex = NEW(MYUD4,5)
SETTYPE pIndex,MYUD4

POINTER pRange
TYPE newudp
     INT Range[100,100,1]
ENDTYPE
pRange = NEW(newudp,5)
SETTYPE pRange,newudp

'@ keywords
POINTER pIndexAt
TYPE MYUD5
     INT Entry[100,100,35]
ENDTYPE
pIndexAt = NEW(MYUD5,5)
SETTYPE pIndexAt,MYUD5

POINTER pRangeAt
TYPE newudp2
     INT Range[100,100,5]
ENDTYPE
pRangeAt = NEW(newudp2,5)
SETTYPE pRangeAt,newudp2

CONST CDDS_ITEM = 0x10000
CONST CDDS_SUBITEM = 0x20000
CONST CDDS_PREPAINT = 0x1
CONST CDDS_ITEMPREPAINT = (CDDS_ITEM|CDDS_PREPAINT)
CONST CDDS_SUBITEMPREPAINT = (CDDS_SUBITEM|CDDS_ITEMPREPAINT)
CONST NM_CUSTOMDRAW = -12
SETID "LVM_ENSUREVISIBLE",4115

TYPE NMCUSTOMDRAWINFO
     NMHDR hdr
     UINT dwDrawStage
     UINT hDC
     WINRECT rc
     UINT dwItemSpec
     UINT uItemState
     UINT lItemlParam
ENDTYPE

TYPE NMLVCUSTOMDRAW
     NMCUSTOMDRAWINFO nmcd
     UINT clrText
     UINT clrTextBk
     INT  iSubItem
ENDTYPE

TYPE NMLISTVIEW
     UINT hwndFrom
     INT  idFrom
     INT  code
     INT  iItem
     INT  iSubItem
     UINT uNewState
     UINT uOldState
     UINT uChanged
     INT  ptActionx
     INT  ptActiony
     INT  lParam
ENDTYPE

TYPE NMCUSTOMDRAWINFO
     NMHDR Hdr
     UINT dwDrawStage
     UINT hDc
     WINRECT rc
     UINT dwItemSpec
     UINT uItemState
     UINT lItemlParam
ENDTYPE

'Used by ColorListView()
TYPE NMLVCUSTOMDRAW
     NMCUSTOMDRAWINFO NmCd
     UINT ClrText
     UINT ClrTextBk
     INT iSubItem
ENDTYPE

LVHITTESTINFO LvHit
LVITEM lvi1,lvi2
WINRECT rc

LvHit = 0
lvi1 = 0
lvi2 = 0
rc = 0
rc = 0

'**********************************************************
'                 Variable size settings                  '
'                                                         '
' 512 characters per line - variables "dIn" and "LineOut" '
' 400 words per line - variables "WordIn", "aWord"        '
' 400 delimeters per line e.g. ",+,-,(,),[,] etc...       '
'**********************************************************
ISTRING dIn[512]			'Characters per line to read in
ISTRING ClipdIn[512,100000]	'Characters per line to read in
ISTRING LineOut[512,1]	'Character to write to file per line
ISTRING WordIn[400]		'Number of words per line

'**********************************************************
'          Delimiters used to separate key words.         '
'**********************************************************
ISTRING CheckLetter[20]  =  CHR$(34) + "' ,-+()[]=:<>&|" + CHR$(9) 'Includes tabs and quotations.
ISTRING CheckLetter2[50] =  CHR$(34) + "' ,-+()[]=:<>&|" + CHR$(9) + CHR$(13)  + CHR$(0) + CHR$(10) + "."
ISTRING CheckLetter4[50] =  CHR$(34) + "' ,0123456789-+()[]=:<>&|.\/%*!<>^_~#?" + CHR$(9) + CHR$(13)  + CHR$(0) + CHR$(10) 'Includes tabs and quotations.
ISTRING CheckLetter5[20]  =  CHR$(34) + "' ,-+()[]=:<>|" + CHR$(9)
istring CheckLetters[30] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
istring CheckNumber[15]  = "0123456789"
ISTRING CheckDelimiter[50] =  CHR$(34) + "' ,-+()[]=:<>&|.\/%*!<>^_~#?" + chr$(13)

'**********************************************************
'                  Other variables used.                  '
'**********************************************************

CONST WM_CHILD = 0x22

CONST Combo2 = 2000
CONST SubJump = 2001
CONST StartSub = 2002
CONST EndSubb = 2003
CONST SubStatic = 2004
CONST Combo88 = 2005

CONST Combo4 = 2100
CONST WinHandler = 2104
CONST WinJump = 2105
CONST EndWin = 2106
CONST WinStatic = 2107

CONST Combo6 = 2200
CONST BookJump = 2204
CONST BookAdd = 2205
CONST BookDel = 2206
CONST BookStatic = 2207

CONST SaveButton  = 2300
CONST OpenButton  = 2301
const ListView = 2302
const ListView2 = 2303
const ListView4 = 2304
const ListView5 = 2305
const ListView6 = 2306
const Combo1 = 2307
const BUTTON_1 = 2309
const BUTTON_2 = 2310
const BUTTON_3 = 2311
const BUTTON_4 = 2312
const STATIC_1 = 2313
const STATIC_2 = 2314
const STATIC_3 = 2315
const STATIC_4 = 2316

TYPE CliptextP
     ISTRING ClipText[512]
endtype
pointer cp
cp = NEW(ClipTextP,1)

FILE myFile
WINDOW win=0,w1=0,w2=0,w3=0,w4=0,w5=0,w6=0,w7=0,w8=0,w10=0,w11=0,w12=0,w13=0,w14=0,w15=0,w16=0,w17=0,form=0
WINDOW w20,w21,w61=0,w62=0
ISTRING KeyWordLetters[30] = "ABCDEFGHIJKLNMOPQRSTUVWXYZ$_@" 'Keyword start letters / characters.
ISTRING CheckKeyboard[50] = "ABCDEFGHIJKLNMOPQRSTUVWXYZ/" + CHR$(39)
ISTRING LettersOnly[60] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@$_\x8\xD"
ISTRING line$[512]= ""
ISTRING ProgName[260]=""
ISTRING ProgPath[260]=""
ISTRING OldIDEName[260]=""
ISTRING fileNames[260]=""
ISTRING fileSource[260]=""
ISTRING IWBpath[260]=""
ISTRING ClipText[524288]=""
ISTRING ClipText2[524288]=""
ISTRING lb[1000]= ""
ISTRING OpenWith[256] = "explorer.exe"	'Open the output file with your IDE.
STRING EBasic[20]=""
STRING ToolName[100]=""
STRING ToolPath[100]=""
STRING ProgsOpen[100]=""
STRING PreferenceWord[30]=""
STRING FindWord[500]=""
STRING ReplaceWord[500]=""
STRING SaveWord[500]=""
STRING FindDel[500]=""
STRING ReplaceDel[500]=""
STRING Sequence[500]="" 
STRING SubRoutines[1000]=""
STRING Selects[1000]=""
STRING SelectsSub[1000]=""
STRING SearchSub[1000]=""
STRING RecentProgramFiles[10000] = ""
STRING Sub1[10000] = ""
STRING Sub2[10000] = ""
STRING SubStart[10000] = ""
STRING SubEnd[10000] = ""
STRING RemoveStartA[10000] = ""
STRING RemoveEndA[10000] = ""
STRING SearchWindow[10000]=""
STRING HandleName[10000]=""
STRING SequenceFromLine[5000]=""
STRING ArrayA[10000]=""
STRING ArrayB[10000]=""
STRING ArrayC[10000]=""
STRING ArrayD[10000]=""
STRING TempSelect[10000]=""
STRING IncludePath="",FrontPath=""
STRING MyIniPath=""
STRING LastLetter=""
STRING Letter=""
STRING Letter2=""
STRING lx$ = ""
STRING NewWord=""
STRING Text="",IniFile="",WordOut="",UseThis="",BlockSearch="",NewBlockName="",OldBlockName=""
STRING StoreHandlerName=""
STRING ns="",FileMode="",NewWindowName="",FilterFiles=""
STRING ShowToolCloseBox="",ShowOutputProg="",ShowFontSize="",ShowFontName="",ShowTextForeGround="",ShowTextBackGround=""
STRING ShowHColour="",ShowBColour="",ShowHStyle="",ShowBStyle="",ShowTips="",ShowEnglish="",ShowTimeout="",ShowIcon=""
STRING FileDirectory="",FileNameIs="",NewWindowReference="",OldWindowReference=""
STRING LineStartsFrom = "",LineEndsAt = "",HandleNameInList = ""
STRING TempText = "",TempText2 = "",TempText3 = "",TempText4 = "",TempStart = "",TempEnd = "",TempType = "",TempCH = "",TempNWN = "",TempOWN = ""
STRING spin="",UpAlevel="",Caption=""
string TabString = ""
POINTER LOCK
FLOAT TimingmSec=0,OverHead=0,AveTime=0
UINT rHandle = 0
UINT64 Freq=0,StartCount=0,StopCount=0,hTooltip=0
UINT dwStyle = WS_CHILD|WS_TABSTOP
UINT hdc=0,font=0,oldfont=0
UINT handle=0
UINT hIcon=0
UINT hEdit=0,lpFn=0
UINT ButtonType=0,fgv=0
STRING ThisLetter = ""
int Del = 0
int Num = 0
int NumP = 0
int FontSize = 0
int OldFontSize = 0
int LineSpace = 0
int LinesPerPage = 0
int TabSpacing = 0
int fSize = 0
int ColourNumbers = 0
int kw = 0
INT EditPos = 0
int Loading = 1
int Scrolling = 0
int TheWordSelected = 0
INT CommentBlockStart = 0
INT CommentBlockEnd = 0
INT OpenRound = 0
INT CloseRound = 0
INT OpenSquare = 0
INT CloseSquare = 0
INT SubOpen = 0
INT EndSubOpen = 0
INT WinOpen = 0
INT EndWinOpen = 0
INT LineHasSub = 0
INT aw = 0
INT InitialLoad = 0
INT tabcount = 0
INT spacecount = 0
ISTRING iftabs[5] = ""
INT Subs[50000]
INT SelectCount[5000] = 0
INT Spacer = 0
INT DoCase = 0
INT ThisRange = 0
INT CheckWordLen = 0
INT CheckWordLen2 = 0
INT WordLoop = 0
INT GetWord = 0
INT ToLoop = 0
INT slc = 0
INT StopNow = 0
INT StartMinimised = 0
INT IniLocated = 0
INT SubRoutineStart[1000]=0
INT SubRoutineEnd[1000]=0
INT SelectStart[10000]=0
'INT SelectEnd[10000]=0 - Dup with const.
INT RemoveCountA = 0
INT WindowStart[1000]=0
INT WindowEnd[1000]=0
INT HandleStart[1000]=0
INT SequenceOrder[500]=0
INT SequenceFound[500]=0
INT SequenceDone[500]=0
INT OptionName[30] = 0
INT ReplaceWords = 0
INT ReplaceDels = 0
INT ReplaceExact = 0
INT LineEndPos[20000]
INT caseX = 0
INT StartPos = 0
INT EndPos = 0
INT ThisPos = 0
INT InsertPosAt = 0
int Tabss = 0
int WordCountS = 0
int DelCountS  = 0
INT nv=0,FromToolsMenu=0,CancelAdd=0,SpacesToAddFromTools=0,BlockType=0
INT SetOptionUcase=0,SetOptionAdd=0,SetOptionOnly=0,SetOptionIgnoreS=0,SetOptionIgnoreB=0,SetOptionIgnoreQ=0
INT SetOptionRemoveDels=0,SetOptionRemoveTabs=0,SetOptionRemoveEmpty=0,SetOptionRemoveFromEmpty=0,SetOptionOutput=0
INT SetOptionProgress=0,SetOptionClose=0
INT height=0,weight=0,SendToClipBoard=0,WordsNeeded=0,LettersNeeded=0,SaveToFile=0,ButtonStyles=0
INT WordCount=0,OpenProgs=0,BlockComment=0,ConvertDone=0,BlockStart=0,BlockEnd=0,Match=0,WindowState=0
INT hdesk=0,hnext=0,style=0,Lines=0,LineCount=0,ClipBoard=0,a=0,b=0,c=0,j=0,n=0,x=0,xy=0,y=0,z=0
INT SourceIsFile=0,SourceIsIDE=0,Down=0,SetSpacing=0,WordCountP=0
INT startat5=0,startat6=0,startat7=0,WinSize=0,BlockFound=0,BlockName=0,CopyHandlerAsWell=0,TempSet=0
INT SaveFileC=0,SaveClipC=0,SearchFileC=0,SearchIDEC=0,ReplaceC=0,flags=0,col=0,ProgFound=0,SearchReplace=0
INT SubNutNoWindow=0,WindowButNoSub=0,QuotesOn=0,QuotesOff=0
INT ListCount=0,InCount=0,FoundCount=0,EmptyLine=0,FindWords=0,FindDels=0,FoundWords=0,FoundDels=0
INT SequenceCount=0,SequenceFromLineCount=0,MatchedUp=0,SearchOrder=0,AllFound=0,MatchCount=0
INT SubCount=0,SearchSubCount=0,WindowCount=0,IncludeCount=0,LVpos=0,LVpos2=0
INT posat=0,levels=0,Clicked=0,TabWidth=0,AllOcurrences = 0
INT OnWord = 0
INT SaveBox = 0
INT IfCount=0,EndIfCount=0
INT IfArray[500]=0
INT EndIfArray[500]=0
INT IfLine[500]=0
INT EndIfLine[500]=0
INT IfLineCount=0
int bW=0,bH=0,notifycode=0
int bcolor=0
int i=0,sp=0,run=0,fcolor=0
int fcr=0,fcg=0,fcb=0
int bcr=0,bcg=0,bcb=0
STRING IfFullLine[50000]=""
STRING TextLine[50000]=""

INT TimerSpeed = 200
int SpaceSpacing = 0
int SaveNewDefaults = 0
int Downs = 0
INT OldHandle = 0
UINT hListView=0
INT OldWords = 0
INT st = 0
INT ActStart = 0
INT WordPos[100] = 0
INT WordPosCount = 0
INT CheckThisWord = 0
INT Acomplete = 0
INT varStart=0,varEnd=0
INT c1 = 0
INT mlParam = 0
INT Offset = 0
INT KeyWordCount = 0
INT ll = 0

FILE myfile2

CONST CHECKED = 1
ISTRING txt1[260]="",txt2[260]=""
INT NoRestore = 0
INT CloseIfEditorCloses = 0

'Other variables
int Total = 0
istring LcaseS[26] = "fijlmrtw"
int LcaseV[26] = 0
LcaseV[1] = 7
LcaseV[2] = 6
LcaseV[3] = 7
LcaseV[4] = 6
LcaseV[5] = 13
LcaseV[6] = 7
LcaseV[7] = 7
LcaseV[8] = 12

istring UcaseS[26] = "IMOQW"
int UcaseV[26] = 0
UcaseV[1] = 6
UcaseV[2] = 12
UcaseV[3] = 12
UcaseV[4] = 12
UcaseV[5] = 15

istring Numbers[26] = "01234567890"
istring Others[5] = " -_."
int OthersV[5]
OthersV[1] = 10
OthersV[2] = 6
OthersV[3] = 10
OthersV[4] = 4

STRING fontname=""
INT size=0
INT LineGap = 23
INT Speed = 100

filter = "IWBasic files|*.iwb|EBasic files|*.eba|Include files|*.inc||"
GetFileName(w1,0,ProgPath,1)

'*************************************************
'     IWB ini file & program icon file paths     "
'*************************************************
STRING MyPathToIWB = ""
STRING IconPath = ""

'************************************************'
'                                                '
'     Program startup preference defaults        '
'                                                '
'        Set in ConvertPreferences.ini           '
'                                                '
'*************************************************

INT DefaultSource = 0				'1 = File, 2 = IDE, 3 = Clipboard.
INT DefaultDestination = 0			'1 = File, 2 = Clipboard.
INT ClipBoardToClipBoard = 0  	'1 = Source & destnation is from / to the clipboard (overrides previous two defaults).
INT DontOpenTheWindow = 0			'1 = Don't open the window just convert (from / to clipboard) & end program.
INT ShowTheToolTips = 0				'Show tooltips on screen.
INT Ucase = 0 							'Convert to uppercase.
INT Regardless = 0					'Only convert keywords not already typed in upper or lowercase.
INT SetSingle = 0  					'Don't convert single comment lines. 'This is a comment.
INT SetBlock = 0						'Ignore block comments /* bla bla bla */.
INT IgnoreQuotes = 0					'Ignore any words in quotations "This ia a quote"
INT RemoveSpaces = 0    			'Remove spaces from delimiters.
INT RemoveTabs = 0      			'Remove tabs.
INT RemoveEmptyLines = 0     		'Remove lines with nothing in them.
INT CleanLines = 0               'Remove tabs and spaces from empty lines.
INT IndentSpaces = 8          	'Add 'x' number of spaces to start of lines.
INT OpenOutputFile = 0  			'Open output file after conversion.
INT ShowProgress = 0					'Show processed lines on screen, 0 = quicker.
INT CloseWhenDone = 0				'Close program when finished converting.
INT SleepTime = 0						'Delay time before closing program - e.g. 1000 = 1 second.
INT TimePrecision = 0				'Timing precision e.g. 10 places.
INT OptimiseForSpeed = 0			'1 = Optimise for speed, will override some preferences above.
INT CloseAfterCreatingAtool = 0	'1 = Close main program after running a tool.
INT English = 0 						'1 = Englisk UK, 2 = English US.
INT EditorType = 0					'1 = IWB, 2 = Ebasic, 3 = Cbasic.

UINT color1,color3,color4
     color1 = RGB(255,204,204) 'Background colour (Pink - highlight)
     color3 = RGB(0,0,0)       'Text colour
     color4 = RGB(255,255,255) 'Background colour (White - normal)
INT rv=0,currentcolor=0

INT SearchPos = -1
INT LastPosFound = 0
INT Change = 0
INT SearchLoop = 0
INT SearchLoopTo = 0
STRING InfoA=""
STRING SearchFor=""

IF OptimiseForSpeed = 1
   ClipBoardToClipBoard = 0
   Regardless = 0
   SetSingle = 0
   SetBlock = 0
   IgnoreQuotes = 0
   RemoveSpaces = 0
   RemoveTabs = 0
   RemoveEmptyLines = 0
   ShowProgress = 0
ENDIF

'Options you want to show on screen ( listed here in screen order from 'Only convert...' ).
INT ShowUcase = 0
INT ShowRegardless = 0
INT ShowIndentSpaces = 0
INT ShowSetSingle = 0
INT ShowSetBlock = 0
INT ShowIgnoreQuotes = 0
INT ShowRemoveSpaces = 0
INT ShowRemoveTabs = 0
INT ShowCleanLines = 0
INT ShowRemoveEmptyLines = 0
INT ShowOpenOutputFile = 0
INT ShowShowProgress = 0
INT ShowCloseWhenDone = 0

'*************************************************
'            Open output file program            "
'*************************************************

IF INSTR(OpenWith,"\\")
   DO
     OpenWith = MID$(OpenWith,INSTR(OpenWith,"\\")+1,LEN(OpenWith))
   UNTIL INSTR(OpenWith,"\\") = 0
ENDIF

'******************************************
' Fields for Font / text colour / buttons '
'******************************************
INT BackGround = RGB(129,203,115)'Background colour.
INT Hon  = RGB(0,0,200)				'Selection on colour.
INT Hoff = RGB(0,0,0)				'Selection off colour.
INT HonStyle = @SFITALIC			'Selection on style.

SETID "CFTEXT",1
SETID "GHND",0x42
SETID "LVM_ENSUREVISIBLE",4115
handle = GlobalAlloc(@GHND,2000000)
LOCK = GlobalLock(handle)

'*************************************************
'            Build word sizes indexes            '
'*************************************************
'                                                '
' For all keywords using the first letters       '
' get the maximum length and the number of times '
' in occurs.                                     '
'                                                '
' Example - take keywords beginnig with "A"      '
' and look at these keywords -                   '
'                   AND, ABS, ASC.               '
'                                                '
' It tells us there are only 3 keywords that     '
' begin with "A" and are 3 characters in length. '
'                                                '
' So if you were checking for the keyword "ASC"  '
' there on no point searching thropugh all of    '
' the "A" keywords until you find "ASC".         '
'                                                '
' Just search AND, ABS, ASC.                     '
'                                                '                                                '
' It's much faster.                              '
'                                                '
' Indexes:                                       '
'                                                '
' Index   - Keywords exclusind "@" keywords.     '
' IndexAt - "@" keywords only.                   '
'                                                '
' The above indexes store:                       '
' Start letter                                   '
' Length                                         '
' Keyword refence number for the array Words[x]  '
'                                                '
' Indexes:                                       '
'                                                '
' IndexTo   - Keywords exclusind "@" keywords.   '
' IndexToAt - "@" keywords only.                 '
'                                                '
' The above indexes store how many times         '
' a word of a given length occurs.               '
' This gives us our search range e.g. 3 words.   '
'                                                '
'*************************************************
SUB IndexKeyWords(opt int MaxKeyWords)
    INT qq = 0
    INT inw = 0
    INT inl = 0
    INT ina = 0
    INT c[100]
    FOR z = 1 TO 100
        c[z] = 0
    NEXT z
    '@ keywords.
    FOR a = 1 TO 805
        IF LastLetter <> MID$(#p[a].Words,2,1)
           FOR z = 2 TO 100
               c[z] = 0
           NEXT z
           LastLetter = MID$(#p[a].Words,2,1)
        ENDIF
        qq = LEN(#p[a].Words)-1
        c[qq] = c[qq] + 1
        inw = INSTR(KeyWordLetters,MID$(#p[a].Words,2,1))
        inl = LEN(#p[a].Words)-1
        ina = c[LEN(#p[a].Words)-1]
        #pIndexAt[1].Entry[inw,inl,ina] = a
        #pRangeAt[1].Range[inw,inl,0] = ina
    NEXT a
    'All other keywords.

    int MaxNo = 1661
    if MaxKeyWords > 0
       MaxNo = MaxKeyWords
    endif

    FOR a = 806 TO MaxNo
        IF LastLetter <> MID$(#p[a].Words,1,1)
           FOR z = 2 TO 100
               c[z] = 0
           NEXT z
           LastLetter = MID$(#p[a].Words,1,1)
        ENDIF
        c[LEN(#p[a].Words)] ++
        #pIndex[1].Entry[INSTR(KeyWordLetters,MID$(#p[a].Words,1,1)),LEN(#p[a].Words),c[LEN(#p[a].Words)]] = a
        #pRange[1].Range[INSTR(KeyWordLetters,MID$(#p[a].Words,1,1)),LEN(#p[a].Words),0] = c[LEN(#p[a].Words)]
    NEXT a
RETURN
ENDSUB

SUB CopyStringToClipboard(ISTRING Itext[524288])
    ClipText = ""
    EmptyClipBoard()
    HGLOBAL handle =  GlobalAlloc(GHND,LEN(Itext)+1)
    POINTER LOCK = GlobalLock(handle)
    memcpy(LOCK, Itext, LEN(Itext)+1)
    GlobalUnlock(handle)
    OpenClipboard(w1.hwnd)
    EmptyClipboard()
    SetClipboardData(CF_TEXT,handle)
    CloseClipboard()
ENDSUB

SUB ReadClipBoard()
    WordsNeeded = 0
    LettersNeeded = 0
    LineCount = 1
    OpenClipboard(win.hWnd)
    handle = GetClipboardData(@CFTEXT)
    LOCK = GlobalLock(handle)
    ClipText = #<STRING>LOCK
    GlobalUnlock(handle)
    CloseClipboard()
    FOR a = 1 TO LEN(ClipText)
          ISTRING add[2] = MID$(ClipText,a,1)
        IF add = CHR$(13)
           a ++
           add = MID$(ClipText,a,1)
           LineCount ++
           GOTO DoNext
        ENDIF
        LettersNeeded ++
        ClipdIn[0,LineCount] = ClipdIn[0,LineCount] + add
    LABEL DoNext
    NEXT a
RETURN
ENDSUB

SUB ReadClipBoardEditor()
    WordsNeeded = 0
    LettersNeeded = 0
    LineCount = 1
    OpenClipboard(win.hWnd)
    handle = GetClipboardData(@CFTEXT)
    LOCK = GlobalLock(handle)
    ClipText = #<STRING>LOCK
    GlobalUnlock(handle)
    CloseClipboard()
RETURN
ENDSUB

SUB Finish()
    delete cp
    DELETE p
    DELETE w
    delete m
    delete s
    DELETE d
    delete e
    DELETE lp
    DELETE tpl
    DELETE cr
    DELETE Attrib
    DELETE pIndex
    DELETE pIndexAt
    DELETE pRange
    DELETE pRangeAt
    DELETEIMAGE hIcon,@IMGICON
    CLOSEWINDOW w1
    closeconsole
    END
RETURN
ENDSUB

SUB GetFileName(WINDOW WinIn,INT ControlIn,STRING FileIn,OPT INT NoSet)

    IF FileIn = ""
       'FileNameIs = "Untitled.iwb"
       RETURN
    ENDIF

    FileDirectory = ""
    FileNameIs = ""
    STRING FileChange = FileIn
    STRING CharIs = ""
    INT SlashPos = 0
    IF INSTR(FileChange,"\\")
       FOR a = 1 TO LEN(FileChange)
           CharIs = MID$(FileChange,a,1)
           IF CharIs = "\\"
              SlashPos = a
           ENDIF
       NEXT a
       FileNameIs = MID$(FileChange,SlashPos+1,LEN(FileChange))
       FileDirectory = UCASE$(MID$(FileChange,1,1)) + MID$(FileChange,2,SlashPos-2)
       IF NoSet = 0
          SETCONTROLTEXT(WinIn,ControlIn,FileDirectory + " --- " + FileNameIs)
       ENDIF
    ENDIF
RETURN
ENDSUB

SUB Indent(),STRING
          INT tabcount = 0
          INT spacecount = 0

          FOR a = 1 TO LEN(dIn)
              ISTRING iftabs[2] = MID$(dIn,a,1)
              IF ASC(iftabs) > 32
                 BREAKFOR
              ENDIF
              IF iftabs = CHR$(9)
                 tabcount ++
              ENDIF
              IF iftabs = CHR$(32)
                 spacecount ++
                 IF spacecount = TabWidth
                    tabcount ++
                    spacecount = 0
                 ENDIF
              ENDIF
          NEXT a

          dIn = LTRIM$(dIn)
          INT Spacer = spacecount + (tabcount * 3)
          FOR a = 1 TO Spacer
              dIn = " " + dIn
          NEXT a
RETURN dIn + " "
ENDSUB

SUB ChangeWordEditorZ(OPT UINT id,STRING CheckWord,OPT INT StartPos,OPT INT EndPos),STRING
    ISTRING line4$[512] = ""
    IF !len(CheckWord) THEN
       RETURN CheckWord
    ENDIF
    Letter  = UCASE$(MID$(CheckWord,1,1))
    Letter2 = UCASE$(MID$(CheckWord,2,1))
    IF INSTR("QXYZ",Letter) THEN RETURN CheckWord 'There are no keywords beginning with these letters.
    IF ASC(Letter) >= 48 AND ASC(Letter) <= 58
       RETURN CheckWord 'No keywords start with a number
    ENDIF

    CheckWordLen = LEN(CheckWord)
    CheckWordLen2 = CheckWordLen - 1
    GetWord = 0
    Match = 0

    IF Letter <> "@"
       'Read keyword index.
       ThisRange = INSTR(KeyWordLetters,Letter)
       ToLoop = #pRange[1].Range[ThisRange,CheckWordLen,0]
       DoCase = 1
    ELSE
       'Read @ keyword index.
       ThisRange = INSTR(KeyWordLetters,Letter2)
       ToLoop = #pRangeAt[1].Range[ThisRange,CheckWordLen2,0]
       DoCase = 2
    ENDIF

    FOR WordLoop = 1 TO ToLoop
        SELECT DoCase
               CASE 1
                    'Get keyword index number.
                    GetWord = #pIndex[1].Entry[ThisRange,CheckWordLen,WordLoop]
               CASE 2
                    'Get @ keyword index number.
                    GetWord = #pIndexAt[1].Entry[ThisRange,CheckWordLen2,WordLoop]
        ENDSELECT
        IF UCASE$(CheckWord) = #p[GetWord].Words
           Match = GetWord
           SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
           IF Ucase <> 3
              IF Ucase = 1
                 CheckWord = UCASE$(CheckWord)
                 CONTROLCMD w1,id,@RTREPLACESEL,CheckWord
              else
                 CheckWord = LCASE$(CheckWord)
                 CONTROLCMD w1,id,@RTREPLACESEL,CheckWord
              ENDIF
              SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
           ENDIF
           SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
           cf.dwMask = CFM_COLOR
           cf.crTextColor = #Attrib[GetWord].Colour
           cf.cbSize = SIZEOF(cf)
           SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
           'SELECT Ucase
                   'CASE 1 'Upper case
                         'RETURN ucase$(CheckWord) '#p[GetWord].Words
                  'CASE 2 'Lower case
                       'RETURN LCASE$(CheckWord)
                  'CASE 3 'As typed
                       RETURN CheckWord
           'ENDSELECT
        ELSE
           'SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
           'cf.dwMask = CFM_COLOR
           'cf.crTextColor = RGB(0,0,0)
           'cf.cbSize = SIZEOF(cf)
           'SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
        ENDIF
    NEXT WordLoop

'Non key word
RETURN CheckWord
ENDSUB

SUB ConvertWordsZ(INT LineNoIn,ISTRING LineToWords[255],INT Offset),STRING
     ThisLetter = ""
     tabcount = 0
     spacecount = 0

     dIn = LTRIM$(dIn)
     Spacer = spacecount + (tabcount * 3)
     FOR c1 = 1 TO Spacer
         dIn = " " + dIn
     NEXT c1

     LineOut = ""
     LineLen = LEN(LineToWords)
     WordIn = ""

     FOR b1 = 1 TO LineLen

         ThisPos = b1 + Offset
         ThisLetter = LineToWords[b1-1]
         Del = INSTR(CheckLetter2,ThisLetter)

         SELECT Del

                CASE 0 'Add character to our word
                     WordIn = WordIn + ThisLetter

                CASE 1 'Quotes
                     LineOut = LineOut + ThisLetter
                     WordIn = ""
                     DO
                        b1 ++
                        ThisLetter = LineToWords[b1-1]
                        LineOut = LineOut + ThisLetter
                     UNTIL ThisLetter = CHR$(34) OR b1 = LineLen

                     IF b1 = LineLen THEN RETURN LineOut

                CASE 2 ' comment symbol
                     LineOut = LineOut + ThisLetter
                     WordIn = ""
                     DO
                        b1 ++
                        ThisLetter = LineToWords[b1-1]
                        LineOut = LineOut + ThisLetter
                     UNTIL b1 = LineLen

                     IF b1 = LineLen THEN RETURN LineOut


                DEFAULT 'Delimiter - so we have our word
                     WordIn = ChangeWordEditorZ(0,WordIn)
                     LineOut = LineOut + WordIn + ThisLetter
                     WordIn = ""

         ENDSELECT
    NEXT b1

    WordIn = ChangeWordEditorZ(0,WordIn)
    LineOut = LineOut + WordIn

RETURN LineOut
ENDSUB

CONST WM_GETTEXTLENGTH = 0xE
SUB AppendEdit(WINDOW win,INT id,STRING text,INT addNL)
   INT _textlen:_textlen =SENDMESSAGE(win, WM_GETTEXTLENGTH,0,0,id)
   CONTROLCMD win, id, @EDSETSELECTION, _textlen, _textlen
   IF(addNL)
      CONTROLCMD win, id, @EDREPLACESEL, text + "\n"
   ELSE
      CONTROLCMD win, id, @EDREPLACESEL, text
   ENDIF
RETURN
ENDSUB

SUB LocateIniFile(),INT
INT IniLocated
    printdirIWB("C:\\")
    IF IniLocated = 1 'Found
       IF OPENFILE(MyFile,IWBpath,"R") = 0 'And opened
          CLOSEFILE MyFile
          RETURN 1
       ELSE
          RETURN 2
       ENDIF
   ENDIF
RETURN 0
ENDSUB

SUB printdirIWB(path:ISTRING),INT
DEF count:INT
DEF dir,attrib=0:INT
DEF filename:STRING
DEF fullname[512]:ISTRING
count = 0
dir = FINDOPEN(path + "*.*")
IF(dir)
   DO
      filename = FINDNEXT(dir,attrib)
      IF LEN(filename)
         IF attrib & @FILE_DIRECTORY
            IF(filename <> ".") & (filename <> "..")
               fullname = path + filename + "\\"
               STRING Location = MID$(path,4,LEN(Path))
               STRING Front = MID$(path,1,3)
               IF MID$(UCASE$(Location),1,6) = "IWBDEV"
                  IF INSTR(UCASE$(path),"IWBDEV")
                     IF INSTR(UCASE$(path),"INCLUDE")
                     IncludePath = Location
                     FrontPath = Front
                     StopNow = 1
                     ENDIF
                  ENDIF
               ENDIF
               IF StopNow = 1 THEN RETURN 1
               printdirIWB(fullname)
            ENDIF
         ENDIF
      ENDIF
   UNTIL filename = ""
   FINDCLOSE dir
ENDIF
RETURN count
ENDSUB

SUB ReadKeyWords(),INT 'IWB keywords.
'@
#p[1].words ="@ALPHA"
#p[2].words ="@AUTOSCALE"
#p[3].words ="@BACKENABLED"
#p[4].words ="@BLOCKCOPY"
#p[5].words ="@BLTALPHA"
#p[6].words ="@BLTCOPY"
#p[7].words ="@BLTHFLIP"
#p[8].words ="@BLTROTOZOOM"
#p[9].words ="@BLTSCALED"
#p[10].words ="@BLTSHADOW"
#p[11].words ="@BLTTRANS"
#p[12].words ="@BLTTRANSALPHA"
#p[13].words ="@BLTTRANSHFLIP"
#p[14].words ="@BLTTRANSROTOZOOM"
#p[15].words ="@BLTTRANSSCALED"
#p[16].words ="@BLTTRANSSHADOW"
#p[17].words ="@BLTTRANSVFLIP"
#p[18].words ="@BLTVFLIP"
#p[19].words ="@BORDER"
#p[20].words ="@BROWSELOAD"
#p[21].words ="@BROWSEPRINT"
#p[22].words ="@BROWSER"
#p[23].words ="@BROWSESEARCH"
#p[24].words ="@BROWSESTOP"
#p[25].words ="@BUTTON"
#p[26].words ="@CANCELNAV"
#p[27].words ="@CAPTION"
#p[28].words ="@CBEN_BEGINEDIT"
#p[29].words ="@CBEN_DELETEITEM"
#p[30].words ="@CBEN_DRAGBEGINA"
#p[31].words ="@CBEN_DRAGBEGINW"
#p[32].words ="@CBEN_ENDEDITA"
#p[33].words ="@CBEN_ENDEDITW"
#p[34].words ="@CBEN_GETDISPINFO"
#p[35].words ="@CBEN_GETDISPINFOA"
#p[36].words ="@CBEN_GETDISPINFOW"
#p[37].words ="@CBEN_INSERTITEM"
#p[38].words ="@CBNCLOSEUP"
#p[39].words ="@CBNDBLCLICK"
#p[40].words ="@CBNDROPDOWN"
#p[41].words ="@CBNEDITCHANGE"
#p[42].words ="@CBNEDITUPATE"
#p[43].words ="@CBNEDITUPDATE"
#p[44].words ="@CBNERRSPACE"
#p[45].words ="@CBNKILLFOCUS"
#p[46].words ="@CBNSELCHANGE"
#p[47].words ="@CBNSELENDCANCEL"
#p[48].words ="@CBNSELENDOK"
#p[49].words ="@CBNSETFOCUS"
#p[50].words ="@CHECKBOX"
#p[51].words ="@CLASS"
#p[52].words ="@CODE"
#p[53].words ="@COMBOBOX"
#p[54].words ="@CONTROLID"
#p[55].words ="@CSARROW"
#p[56].words ="@CSCUSTOM"
#p[57].words ="@CSIDL_ADMINTOOLS"
#p[58].words ="@CSIDL_ALTSTARTUP"
#p[59].words ="@CSIDL_APPDATA"
#p[60].words ="@CSIDL_BITBUCKET"
#p[61].words ="@CSIDL_CDBURN_AREA"
#p[62].words ="@CSIDL_COMMON_ADMINTOOLS"
#p[63].words ="@CSIDL_COMMON_ALTSTARTUP"
#p[64].words ="@CSIDL_COMMON_APPDATA"
#p[65].words ="@CSIDL_COMMON_DESKTOPDIRECTORY"
#p[66].words ="@CSIDL_COMMON_DOCUMENTS"
#p[67].words ="@CSIDL_COMMON_FAVORITES"
#p[68].words ="@CSIDL_COMMON_MUSIC"
#p[69].words ="@CSIDL_COMMON_OEM_LINKS"
#p[70].words ="@CSIDL_COMMON_PICTURES"
#p[71].words ="@CSIDL_COMMON_PROGRAMS"
#p[72].words ="@CSIDL_COMMON_STARTMENU"
#p[73].words ="@CSIDL_COMMON_STARTUP"
#p[74].words ="@CSIDL_COMMON_TEMPLATES"
#p[75].words ="@CSIDL_COMMON_VIDEO"
#p[76].words ="@CSIDL_COMPUTERSNEARME"
#p[77].words ="@CSIDL_CONNECTIONS"
#p[78].words ="@CSIDL_CONTROLS"
#p[79].words ="@CSIDL_COOKIES"
#p[80].words ="@CSIDL_DESKTOP"
#p[81].words ="@CSIDL_DESKTOPDIRECTORY"
#p[82].words ="@CSIDL_DRIVES"
#p[83].words ="@CSIDL_FAVORITES"
#p[84].words ="@CSIDL_FONTS"
#p[85].words ="@CSIDL_HISTORY"
#p[86].words ="@CSIDL_INTERNET"
#p[87].words ="@CSIDL_INTERNET_CACHE"
#p[88].words ="@CSIDL_LOCAL_APPDATA"
#p[89].words ="@CSIDL_MYDOCUMENTS"
#p[90].words ="@CSIDL_MYMUSIC"
#p[91].words ="@CSIDL_MYPICTURES"
#p[92].words ="@CSIDL_MYVIDEO"
#p[93].words ="@CSIDL_NETHOOD"
#p[94].words ="@CSIDL_NETWORK"
#p[95].words ="@CSIDL_PERSONAL"
#p[96].words ="@CSIDL_PRINTERS"
#p[97].words ="@CSIDL_PRINTHOOD"
#p[98].words ="@CSIDL_PROFILE"
#p[99].words ="@CSIDL_PROGRAM_FILES"
#p[100].words ="@CSIDL_PROGRAM_FILES_COMMON"
#p[101].words ="@CSIDL_PROGRAM_FILES_COMMONX86"
#p[102].words ="@CSIDL_PROGRAM_FILESX86"
#p[103].words ="@CSIDL_PROGRAMS"
#p[104].words ="@CSIDL_RECENT"
#p[105].words ="@CSIDL_RESOURCES"
#p[106].words ="@CSIDL_RESOURCES_LOCALIZED"
#p[107].words ="@CSIDL_SENDTO"
#p[108].words ="@CSIDL_STARTMENU"
#p[109].words ="@CSIDL_STARTUP"
#p[110].words ="@CSIDL_SYSTEM"
#p[111].words ="@CSIDL_SYSTEMX86"
#p[112].words ="@CSIDL_TEMPLATES"
#p[113].words ="@CSIDL_WINDOWS"
#p[114].words ="@CSWAIT"
#p[115].words ="@CTCOMBOAUTOHSCROLL"
#p[116].words ="@CTCOMBODROPDOWN"
#p[117].words ="@CTCOMBODROPLIST"
#p[118].words ="@CTCOMBOSIMPLE"
#p[119].words ="@CTCOMBOSORT"
#p[120].words ="@CTEDITAUTOH"
#p[121].words ="@CTEDITAUTOV"
#p[122].words ="@CTEDITCENTER"
#p[123].words ="@CTEDITLEFT"
#p[124].words ="@CTEDITMULTI"
#p[125].words ="@CTEDITNUMBER"
#p[126].words ="@CTEDITPASS"
#p[127].words ="@CTEDITRETURN"
#p[128].words ="@CTEDITRIGHT"
#p[129].words ="@CTEDITRO"
#p[130].words ="@CTLBTNBITMAP"
#p[131].words ="@CTLBTNDEFAULT"
#p[132].words ="@CTLBTNFLAT"
#p[133].words ="@CTLBTNMULTI"
#p[134].words ="@CTLEDITPASS"
#p[135].words ="@CTLISTCOLUMNS"
#p[136].words ="@CTLISTEXTENDED"
#p[137].words ="@CTLISTMULTI"
#p[138].words ="@CTLISTNOTIFY"
#p[139].words ="@CTLISTSORT"
#p[140].words ="@CTLISTSTANDARD"
#p[141].words ="@CTLISTTABS"
#p[142].words ="@CTLSTCBITMAP"
#p[143].words ="@CTLSTCMULTI"
#p[144].words ="@CTLSTCSIMPLE"
#p[145].words ="@CTLSTCTRANS"
#p[146].words ="@CTSCROLLHORIZ"
#p[147].words ="@CTSCROLLVERT"
#p[148].words ="@DTN_CLOSEUP"
#p[149].words ="@DTN_DATETIMECHANGE"
#p[150].words ="@DTN_DROPDOWN"
#p[151].words ="@DTN_FORMATA"
#p[152].words ="@DTN_FORMATQUERYA"
#p[153].words ="@DTN_FORMATQUERYW"
#p[154].words ="@DTN_FORMATW"
#p[155].words ="@DTN_USERSTRINGA"
#p[156].words ="@DTN_USERSTRINGW"
#p[157].words ="@DTN_WMKEYDOWNA"
#p[158].words ="@DTN_WMKEYDOWNW"
#p[159].words ="@DTS_APPCANPARSE"
#p[160].words ="@DTS_LONGDATEFORMAT"
#p[161].words ="@DTS_RIGHTALIGN"
#p[162].words ="@DTS_SHORTDATEFORMAT"
#p[163].words ="@DTS_SHOWNONE"
#p[164].words ="@DTS_TIMEFORMAT"
#p[165].words ="@DTS_UPDOWN"
#p[166].words ="@EDCANUNDO"
#p[167].words ="@EDCHARFROMLINE"
#p[168].words ="@EDCOPY"
#p[169].words ="@EDCUT"
#p[170].words ="@EDDELETESEL"
#p[171].words ="@EDEMPTYUNDO"
#p[172].words ="@EDGETFIRSTLINE"
#p[173].words ="@EDGETLIMITTEXT"
#p[174].words ="@EDGETLINE"
#p[175].words ="@EDGETLINECOUNT"
#p[176].words ="@EDGETLINELENGTH"
#p[177].words ="@EDGETMODIFIED"
#p[178].words ="@EDGETSELECTION"
#p[179].words ="@EDIT"
#p[180].words ="@EDLINEFROMCHAR"
#p[181].words ="@EDPASTE"
#p[182].words ="@EDREPLACESEL"
#p[183].words ="@EDSETLIMITTEXT"
#p[184].words ="@EDSETMARGINS"
#p[185].words ="@EDSETMODIFIED"
#p[186].words ="@EDSETSELECTION"
#p[187].words ="@EDUNDO"
#p[188].words ="@ENCHANGE"
#p[189].words ="@ENENTERKEY"
#p[190].words ="@ENERRSPACE"
#p[191].words ="@ENHSCROLL"
#p[192].words ="@ENKILLFOCUS"
#p[193].words ="@ENM_DROPFILES"
#p[194].words ="@ENM_PROTECTED"
#p[195].words ="@ENMAXTEXT"
#p[196].words ="@ENMCHANGE"
#p[197].words ="@ENMKEYEVENTS"
#p[198].words ="@ENMMOUSEEVENTS"
#p[199].words ="@ENMNONE"
#p[200].words ="@ENMREQUESTRESIZE"
#p[201].words ="@ENMSCROLL"
#p[202].words ="@ENMSELCHANGE"
#p[203].words ="@ENMUPDATE"
#p[204].words ="@ENREQUESTRESIZE"
#p[205].words ="@ENSELCHANGE"
#p[206].words ="@ENSETFOCUS"
#p[207].words ="@ENTABKEY"
#p[208].words ="@ENUPDATE"
#p[209].words ="@ENVSCROLL"
#p[210].words ="@EXCLIENTEDGE"
#p[211].words ="@EXCONTROL"
#p[212].words ="@EXLEFT"
#p[213].words ="@EXRIGHT"
#p[214].words ="@EXSTATICEDGE"
#p[215].words ="@EXWINDOWEDGE"
#p[216].words ="@FALT"
#p[217].words ="@FCONTROL"
#p[218].words ="@FILE_ARCHIVE"
#p[219].words ="@FILE_COMPRESSED"
#p[220].words ="@FILE_DEVICE"
#p[221].words ="@FILE_DIRECTORY"
#p[222].words ="@FILE_ENCRYPTED"
#p[223].words ="@FILE_HIDDEN"
#p[224].words ="@FILE_NORMAL"
#p[225].words ="@FILE_READONLY"
#p[226].words ="@FILE_SYSTEM"
#p[227].words ="@FIXEDSIZE"
#p[228].words ="@FNOINVERT"
#p[229].words ="@FORWARDENABLED"
#p[230].words ="@FSHIFT"
#p[231].words ="@FVIRTKEY"
#p[232].words ="@GETHEADERS"
#p[233].words ="@GETNAVURL"
#p[234].words ="@GETPOSTDATA"
#p[235].words ="@GETSTATUSTEXT"
#p[236].words ="@GETTITLE"
#p[237].words ="@GOBACK"
#p[238].words ="@GOFORWARD"
#p[239].words ="@GOHOME"
#p[240].words ="@GOSTOP"
#p[241].words ="@GROUP"
#p[242].words ="@GROUPBOX"
#p[243].words ="@HDN_BEGINDRAG"
#p[244].words ="@HDN_BEGINTRACK"
#p[245].words ="@HDN_BEGINTRACKW"
#p[246].words ="@HDN_DIVIDERDBLCLICK"
#p[247].words ="@HDN_DIVIDERDBLCLICKW"
#p[248].words ="@HDN_ENDDRAG"
#p[249].words ="@HDN_ENDTRACK"
#p[250].words ="@HDN_ENDTRACKW"
#p[251].words ="@HDN_GETDISPINFO"
#p[252].words ="@HDN_GETDISPINFOW"
#p[253].words ="@HDN_ITEMCHANGED"
#p[254].words ="@HDN_ITEMCHANGEDW"
#p[255].words ="@HDN_ITEMCHANGING"
#p[256].words ="@HDN_ITEMCHANGINGW"
#p[257].words ="@HDN_ITEMCLICK"
#p[258].words ="@HDN_ITEMCLICKW"
#p[259].words ="@HDN_ITEMDBLCLICK"
#p[260].words ="@HDN_ITEMDBLCLICKW"
#p[261].words ="@HDN_TRACK"
#p[262].words ="@HDN_TRACKW"
#p[263].words ="@HDS_BUTTONS"
#p[264].words ="@HDS_DRAGDROP"
#p[265].words ="@HDS_FULLDRAG"
#p[266].words ="@HDS_HIDDEN"
#p[267].words ="@HDS_HORZ"
#p[268].words ="@HDS_HOTTRACK"
#p[269].words ="@HFLIP"
#p[270].words ="@HIDDEN"
#p[271].words ="@HITWINDOW"
#p[272].words ="@HSCROLL"
#p[273].words ="@IDABORT"
#p[274].words ="@IDBEFORENAV"
#p[275].words ="@IDCANCEL"
#p[276].words ="@IDCHANGEWINDOW"
#p[277].words ="@IDCHAR"
#p[278].words ="@IDCLOSEWINDOW"
#p[279].words ="@IDCONTINUE"
#p[280].words ="@IDCONTROL"
#p[281].words ="@IDCREATE"
#p[282].words ="@IDDESTROY"
#p[283].words ="@IDDOCUMENTCOMPLETE"
#p[284].words ="@IDDOWNLOADBEGIN"
#p[285].words ="@IDDOWNLOADCOMPLETE"
#p[286].words ="@IDDRAGDROP"
#p[287].words ="@IDDRAGENTER"
#p[288].words ="@IDDRAGFEEDBACK"
#p[289].words ="@IDDRAGLEAVE"
#p[290].words ="@IDDRAGOVER"
#p[291].words ="@IDDXUPDATE"
#p[292].words ="@IDERASEBACKGROUND"
#p[293].words ="@IDHSCROLL"
#p[294].words ="@IDIGNORE"
#p[295].words ="@IDINITDIALOG"
#p[296].words ="@IDKEYDOWN"
#p[297].words ="@IDKEYUP"
#p[298].words ="@IDLBUTTONDBLCLK"
#p[299].words ="@IDLBUTTONDN"
#p[300].words ="@IDLBUTTONUP"
#p[301].words ="@IDMENUINIT"
#p[302].words ="@IDMENUPICK"
#p[303].words ="@IDMOUSEMOVE"
#p[304].words ="@IDMOVE"
#p[305].words ="@IDMOVING"
#p[306].words ="@IDNAVCOMPLETE"
#p[307].words ="@IDNAVIGATEERROR"
#p[308].words ="@IDNEWWINDOW2"
#p[309].words ="@IDNEWWINDOW3"
#p[310].words ="@IDNO"
#p[311].words ="@IDOK"
#p[312].words ="@IDPAINT"
#p[313].words ="@IDPROGRESSCHANGE"
#p[314].words ="@IDRBUTTONDBLCLK"
#p[315].words ="@IDRBUTTONDN"
#p[316].words ="@IDRBUTTONUP"
#p[317].words ="@IDREQCLEAR"
#p[318].words ="@IDRETRY"
#p[319].words ="@IDSETCURSOR"
#p[320].words ="@IDSIZE"
#p[321].words ="@IDSIZECHANGED"
#p[322].words ="@IDSIZING"
#p[323].words ="@IDSTATUSTEXTUPDATE"
#p[324].words ="@IDTIMER"
#p[325].words ="@IDTITLECHANGE"
#p[326].words ="@IDTRYAGAIN"
#p[327].words ="@IDVSCROLL"
#p[328].words ="@IDYES"
#p[329].words ="@IMGBITMAP"
#p[330].words ="@IMGCURSOR"
#p[331].words ="@IMGEMF"
#p[332].words ="@IMGICON"
#p[333].words ="@IMGMAPCOLORS"
#p[334].words ="@IMGOEM"
#p[335].words ="@IMGSCALABLE"
#p[336].words ="@IPN_FIELDCHANGED"
#p[337].words ="@JOYTYPE_FLIGHTSTICK"
#p[338].words ="@JOYTYPE_GAMEPAD"
#p[339].words ="@JOYTYPE_HEADTRACKER"
#p[340].words ="@JOYTYPE_RUDDER"
#p[341].words ="@JOYTYPE_TRADITIONAL"
#p[342].words ="@JOYTYPE_UNKNOWN"
#p[343].words ="@JOYTYPE_WHEEL"
#p[344].words ="@LBNDBLCLK"
#p[345].words ="@LBNERRSPACE"
#p[346].words ="@LBNKILLFOCUS"
#p[347].words ="@LBNSELCANCEL"
#p[348].words ="@LBNSELCHANGE"
#p[349].words ="@LBNSETFOCUS"
#p[350].words ="@LISTBOX"
#p[351].words ="@LISTVIEW"
#p[352].words ="@LPARAM"
#p[353].words ="@LSDASH"
#p[354].words ="@LSDASHDOT"
#p[355].words ="@LSDASHDOTDOT"
#p[356].words ="@LSDOT"
#p[357].words ="@LSINSIDE"
#p[358].words ="@LSSOLID"
#p[359].words ="@LVDELETEALL"
#p[360].words ="@LVDELETECOLUMN"
#p[361].words ="@LVDELETEITEM"
#p[362].words ="@LVFINDITEM"
#p[363].words ="@LVGETCOLUMNTEXT"
#p[364].words ="@LVGETCOLWIDTH"
#p[365].words ="@LVGETCOUNT"
#p[366].words ="@LVGETSELCOUNT"
#p[367].words ="@LVGETSELECTED"
#p[368].words ="@LVGETTEXT"
#p[369].words ="@LVGETTOPINDEX"
#p[370].words ="@LVINSERTCOLUMN"
#p[371].words ="@LVINSERTITEM"
#p[372].words ="@LVNBEGINLABELEDIT"
#p[373].words ="@LVNCOLUMNCLICK"
#p[374].words ="@LVNDELETEITEM"
#p[375].words ="@LVNENDLABELEDIT"
#p[376].words ="@LVNINSERTITEM"
#p[377].words ="@LVNITEMCHANGED"
#p[378].words ="@LVNITEMCHANGING"
#p[379].words ="@LVNKEYDOWN"
#p[380].words ="@LVSALIGNLEFT"
#p[381].words ="@LVSALIGNTOP"
#p[382].words ="@LVSAUTOARRANGE"
#p[383].words ="@LVSEDITLABELS"
#p[384].words ="@LVSETCOLUMNTEXT"
#p[385].words ="@LVSETCOLWIDTH"
#p[386].words ="@LVSETSELECTED"
#p[387].words ="@LVSETTEXT"
#p[388].words ="@LVSICON"
#p[389].words ="@LVSLIST"
#p[390].words ="@LVSNOCOLUMNHEADER"
#p[391].words ="@LVSNOLABELWRAP"
#p[392].words ="@LVSNOSCROLL"
#p[393].words ="@LVSNOSORTHEADER"
#p[394].words ="@LVSREPORT"
#p[395].words ="@LVSSHOWSELALWAYS"
#p[396].words ="@LVSSINGLESEL"
#p[397].words ="@LVSSMALLICON"
#p[398].words ="@LVSSORTASCENDING"
#p[399].words ="@LVSSORTDESCENDING"
#p[400].words ="@MAXBOX"
#p[401].words ="@MAXIMIZED"
#p[402].words ="@MB_ABORTRETRYIGNORE"
#p[403].words ="@MB_CANCELTRYCONTINUE"
#p[404].words ="@MB_ICONEXCLAMATION"
#p[405].words ="@MB_ICONINFORMATION"
#p[406].words ="@MB_ICONQUESTION"
#p[407].words ="@MB_ICONSTOP"
#p[408].words ="@MB_OK"
#p[409].words ="@MB_OKCANCEL"
#p[410].words ="@MB_RETRYCANCEL"
#p[411].words ="@MB_YESNO"
#p[412].words ="@MB_YESNOCANCEL"
#p[413].words ="@MCN_GETDAYSTATE"
#p[414].words ="@MCN_SELCHANGE"
#p[415].words ="@MCN_SELECT"
#p[416].words ="@MCS_DAYSTATE"
#p[417].words ="@MCS_MULTISELECT"
#p[418].words ="@MCS_NOTODAY"
#p[419].words ="@MCS_NOTODAYCIRCLE"
#p[420].words ="@MCS_WEEKNUMBERS"
#p[421].words ="@MDIFRAME"
#p[422].words ="@MENUCHECK"
#p[423].words ="@MENUDISABLE"
#p[424].words ="@MENUNUM"
#p[425].words ="@MENUPICK"
#p[426].words ="@MESSAGE"
#p[427].words ="@MINBOX"
#p[428].words ="@MINIMIZED"
#p[429].words ="@MOUSEX"
#p[430].words ="@MOUSEY"
#p[431].words ="@MULTISELECT"
#p[432].words ="@MYMESSAGE"
#p[433].words ="@NAVIGATE"
#p[434].words ="@NMCLICK"
#p[435].words ="@NMDBLCLK"
#p[436].words ="@NMKILLFOCUS"
#p[437].words ="@NMOUTOFMEMORY"
#p[438].words ="@NMRCLICK"
#p[439].words ="@NMRDBLCLK"
#p[440].words ="@NMRETURN"
#p[441].words ="@NMSETFOCUS"
#p[442].words ="@NOAUTODRAW"
#p[443].words ="@NOCAPTION"
#p[444].words ="@NORESIZE"
#p[445].words ="@NOTIFYCODE"
#p[446].words ="@NWMF_FIRST"
#p[447].words ="@NWMF_FIRST_USERINITED"
#p[448].words ="@NWMF_FORCETAB"
#p[449].words ="@NWMF_FORCEWINDOW"
#p[450].words ="@NWMF_FROMDIALOGCHILD"
#p[451].words ="@NWMF_FROMPROXY"
#p[452].words ="@NWMF_HTMLDIALOG"
#p[453].words ="@NWMF_INACTIVETAB"
#p[454].words ="@NWMF_OVERRIDEKEY"
#p[455].words ="@NWMF_SHOWHELP"
#p[456].words ="@NWMF_SUGGESTTAB"
#p[457].words ="@NWMF_SUGGESTWINDOW"
#p[458].words ="@NWMF_UNLOADING"
#p[459].words ="@NWMF_USERALLOWED"
#p[460].words ="@NWMF_USERINITED"
#p[461].words ="@NWMF_USERREQUESTED"
#p[462].words ="@OPAQUE"
#p[463].words ="@PBS_MARQUEE"
#p[464].words ="@PBS_SMOOTH"
#p[465].words ="@PBS_VERTICAL"
#p[466].words ="@PGF_DEPRESSED"
#p[467].words ="@PGF_GRAYED"
#p[468].words ="@PGF_HOT"
#p[469].words ="@PGF_INVISIBLE"
#p[470].words ="@PGF_NORMAL"
#p[471].words ="@PGN_CALCSIZE"
#p[472].words ="@PGN_SCROLL"
#p[473].words ="@PGS_AUTOSCROLL"
#p[474].words ="@PGS_DRAGNDROP"
#p[475].words ="@PGS_HORZ"
#p[476].words ="@PGS_VERT"
#p[477].words ="@QUAL"
#p[478].words ="@RADIOBUTTON"
#p[479].words ="@RBBS_BREAK"
#p[480].words ="@RBBS_CHILDEDGE"
#p[481].words ="@RBBS_FIXEDBMP"
#p[482].words ="@RBBS_FIXEDSIZE"
#p[483].words ="@RBBS_GRIPPERALWAYS"
#p[484].words ="@RBBS_HIDDEN"
#p[485].words ="@RBBS_NOGRIPPER"
#p[486].words ="@RBBS_NOVERT"
#p[487].words ="@RBBS_VARIABLEHEIGHT"
#p[488].words ="@RBN_AUTOSIZE"
#p[489].words ="@RBN_BEGINDRAG"
#p[490].words ="@RBN_CHILDSIZE"
#p[491].words ="@RBN_DELETEDBAND"
#p[492].words ="@RBN_DELETINGBAND"
#p[493].words ="@RBN_ENDDRAG"
#p[494].words ="@RBN_GETOBJECT"
#p[495].words ="@RBN_HEIGHTCHANGE"
#p[496].words ="@RBN_LAYOUTCHANGED"
#p[497].words ="@RBS_AUTOSIZE"
#p[498].words ="@RBS_BANDBORDERS"
#p[499].words ="@RBS_DBLCLKTOGGLE"
#p[500].words ="@RBS_FIXEDORDER"
#p[501].words ="@RBS_REGISTERDROP"
#p[502].words ="@RBS_TOOLTIPS"
#p[503].words ="@RBS_VARHEIGHT"
#p[504].words ="@RBS_VERTICALGRIPPER"
#p[505].words ="@REFRESH"
#p[506].words ="@RESACCEL"
#p[507].words ="@RESBITMAP"
#p[508].words ="@RESCURSOR"
#p[509].words ="@RESDATA"
#p[510].words ="@RESDIALOG"
#p[511].words ="@RESGROUPCURSOR"
#p[512].words ="@RESGROUPICON"
#p[513].words ="@RESICON"
#p[514].words ="@RESMENU"
#p[515].words ="@RESMESSAGETABLE"
#p[516].words ="@RESSTRING"
#p[517].words ="@RESVERSION"
#p[518].words ="@RGNBUTTON"
#p[519].words ="@RICHEDIT"
#p[520].words ="@RMBLACK"
#p[521].words ="@RMCOPYPEN"
#p[522].words ="@RMMASKNOTPEN"
#p[523].words ="@RMMASKPEN"
#p[524].words ="@RMMASKPENNOT"
#p[525].words ="@RMMERGENOTPEN"
#p[526].words ="@RMMERGEPEN"
#p[527].words ="@RMMERGEPENNOT"
#p[528].words ="@RMMMERGENOTPEN"
#p[529].words ="@RMNOP"
#p[530].words ="@RMNOT"
#p[531].words ="@RMNOTCOPYPEN"
#p[532].words ="@RMNOTMASKPEN"
#p[533].words ="@RMNOTMERGEPEN"
#p[534].words ="@RMNOTXORPEN"
#p[535].words ="@RMWHITE"
#p[536].words ="@RMXORPEN"
#p[537].words ="@ROTOZOOM"
#p[538].words ="@RTALIGNCENTER"
#p[539].words ="@RTALIGNLEFT"
#p[540].words ="@RTALIGNRIGHT"
#p[541].words ="@RTCANUNDO"
#p[542].words ="@RTCHARFROMLINE"
#p[543].words ="@RTCOPY"
#p[544].words ="@RTCUT"
#p[545].words ="@RTDELETESEL"
#p[546].words ="@RTEMPTYUNDO"
#p[547].words ="@RTFINDTEXT"
#p[548].words ="@RTGETEVENTMASK"
#p[549].words ="@RTGETFIRSTLINE"
#p[550].words ="@RTGETLIMITTEXT"
#p[551].words ="@RTGETLINE"
#p[552].words ="@RTGETLINECOUNT"
#p[553].words ="@RTGETLINELENGTH"
#p[554].words ="@RTGETMODIFIED"
#p[555].words ="@RTGETSELECTION"
#p[556].words ="@RTGETSELTEXT"
#p[557].words ="@RTGETTEXTLENGTH"
#p[558].words ="@RTHIDESEL"
#p[559].words ="@RTLINEFROMCHAR"
#p[560].words ="@RTLOAD"
#p[561].words ="@RTPASTE"
#p[562].words ="@RTPASTESPECIAL"
#p[563].words ="@RTPRINT"
#p[564].words ="@RTREPLACESEL"
#p[565].words ="@RTSAVE"
#p[566].words ="@RTSCROLL"
#p[567].words ="@RTSETALIGNMENT"
#p[568].words ="@RTSETCHAROFFSET"
#p[569].words ="@RTSETDEFAULTCOLOR"
#p[570].words ="@RTSETDEFAULTFONT"
#p[571].words ="@RTSETEVENTMASK"
#p[572].words ="@RTSETLIMITTEXT"
#p[573].words ="@RTSETLINEWIDTH"
#p[574].words ="@RTSETMARGINS"
#p[575].words ="@RTSETMODIFIED"
#p[576].words ="@RTSETSELCOLOR"
#p[577].words ="@RTSETSELECTION"
#p[578].words ="@RTSETSELFONT"
#p[579].words ="@RTUNDO"
#p[580].words ="@SBBOTTOM"
#p[581].words ="@SBENDSCROLL"
#p[582].words ="@SBLEFT"
#p[583].words ="@SBLINEDOWN"
#p[584].words ="@SBLINELEFT"
#p[585].words ="@SBLINERIGHT"
#p[586].words ="@SBLINEUP"
#p[587].words ="@SBPAGEDOWN"
#p[588].words ="@SBPAGELEFT"
#p[589].words ="@SBPAGERIGHT"
#p[590].words ="@SBPAGEUP"
#p[591].words ="@SBRIGHT"
#p[592].words ="@SBTHUMBPOS"
#p[593].words ="@SBTHUMBTRACK"
#p[594].words ="@SBTOP"
#p[595].words ="@SCALED"
#p[596].words ="@SCROLLBAR"
#p[597].words ="@SCROLLDOWN"
#p[598].words ="@SCROLLLEFT"
#p[599].words ="@SCROLLRIGHT"
#p[600].words ="@SCROLLUP"
#p[601].words ="@SDALPHA"
#p[602].words ="@SDANGLE"
#p[603].words ="@SDBLTTYPE"
#p[604].words ="@SDFRAME"
#p[605].words ="@SDHEIGHT"
#p[606].words ="@SDSCALE"
#p[607].words ="@SDSHADOW"
#p[608].words ="@SDSHADOWX"
#p[609].words ="@SDSHADOWY"
#p[610].words ="@SDTRANSKEY"
#p[611].words ="@SDWIDTH"
#p[612].words ="@SDXPOS"
#p[613].words ="@SDXVEL"
#p[614].words ="@SDYPOS"
#p[615].words ="@SDYVEL"
#p[616].words ="@SFITALIC"
#p[617].words ="@SFSTRIKEOUT"
#p[618].words ="@SFUNDERLINE"
#p[619].words ="@SHADOW"
#p[620].words ="@SIZE"
#p[621].words ="@SNDASYNC"
#p[622].words ="@SNDLOOP"
#p[623].words ="@SNDNOSTOP"
#p[624].words ="@SNDSYNC"
#p[625].words ="@STATIC"
#p[626].words ="@STATUS"
#p[627].words ="@SWHIDE"
#p[628].words ="@SWMAXIMIZED"
#p[629].words ="@SWMINIMIZED"
#p[630].words ="@SWRESIZE"
#p[631].words ="@SWRESTORE"
#p[632].words ="@SWSETPANES"
#p[633].words ="@SWSETPANETEXT"
#p[634].words ="@SWSHOW"
#p[635].words ="@SYSBUTTON"
#p[636].words ="@SYSMENU"
#p[637].words ="@TABSTOP"
#p[638].words ="@TB_BOTTOM"
#p[639].words ="@TB_ENDTRACK"
#p[640].words ="@TB_LINEDOWN"
#p[641].words ="@TB_LINEUP"
#p[642].words ="@TB_PAGEDOWN"
#p[643].words ="@TB_PAGEUP"
#p[644].words ="@TB_THUMBPOSITION"
#p[645].words ="@TB_THUMBTRACK"
#p[646].words ="@TB_TOP"
#p[647].words ="@TBBOTTOM"
#p[648].words ="@TBBUTTONCHECK"
#p[649].words ="@TBBUTTONGROUP"
#p[650].words ="@TBENABLEBUTTON"
#p[651].words ="@TBFLAT"
#p[652].words ="@TBFROMHANDLE"
#p[653].words ="@TBGETBUTTONHEIGHT"
#p[654].words ="@TBGETBUTTONSTATE"
#p[655].words ="@TBGETBUTTONWIDTH"
#p[656].words ="@TBLEFT"
#p[657].words ="@TBLIST"
#p[658].words ="@TBNOALIGN"
#p[659].words ="@TBNORESIZE"
#p[660].words ="@TBRESIZE"
#p[661].words ="@TBRIGHT"
#p[662].words ="@TBS_AUTOTICKS"
#p[663].words ="@TBS_BOTH"
#p[664].words ="@TBS_BOTTOM"
#p[665].words ="@TBS_ENABLESELRANGE"
#p[666].words ="@TBS_FIXEDLENGTH"
#p[667].words ="@TBS_HORZ"
#p[668].words ="@TBS_LEFT"
#p[669].words ="@TBS_NOTHUMB"
#p[670].words ="@TBS_NOTICKS"
#p[671].words ="@TBS_RIGHT"
#p[672].words ="@TBS_TOOLTIPS"
#p[673].words ="@TBS_TOP"
#p[674].words ="@TBS_VERT"
#p[675].words ="@TBSETBITMAPSIZE"
#p[676].words ="@TBSETBUTTONSIZE"
#p[677].words ="@TBSETBUTTONSTYLE"
#p[678].words ="@TBSETLABELS"
#p[679].words ="@TBSETTIP"
#p[680].words ="@TBTOOLTIPS"
#p[681].words ="@TBTOP"
#p[682].words ="@TBTRANSPARENT"
#p[683].words ="@TBWRAPABLE"
#p[684].words ="@TCN_GETOBJECT"
#p[685].words ="@TCN_KEYDOWN"
#p[686].words ="@TCN_SELCHANGE"
#p[687].words ="@TCN_SELCHANGING"
#p[688].words ="@TCS_BOTTOM"
#p[689].words ="@TCS_BUTTONS"
#p[690].words ="@TCS_EX_FLATSEPARATORS"
#p[691].words ="@TCS_EX_REGISTERDROP"
#p[692].words ="@TCS_FIXEDWIDTH"
#p[693].words ="@TCS_FLATBUTTONS"
#p[694].words ="@TCS_FOCUSNEVER"
#p[695].words ="@TCS_FOCUSONBUTTONDOWN"
#p[696].words ="@TCS_FORCEICONLEFT"
#p[697].words ="@TCS_FORCELABELLEFT"
#p[698].words ="@TCS_HOTTRACK"
#p[699].words ="@TCS_MULTILINE"
#p[700].words ="@TCS_MULTISELECT"
#p[701].words ="@TCS_OWNERDRAWFIXED"
#p[702].words ="@TCS_RAGGEDRIGHT"
#p[703].words ="@TCS_RIGHT"
#p[704].words ="@TCS_RIGHTJUSTIFY"
#p[705].words ="@TCS_SCROLLOPPOSITE"
#p[706].words ="@TCS_SINGLELINE"
#p[707].words ="@TCS_TABS"
#p[708].words ="@TCS_TOOLTIPS"
#p[709].words ="@TCS_VERTICAL"
#p[710].words ="@TOOLWINDOW"
#p[711].words ="@TOPMOST"
#p[712].words ="@TRANS"
#p[713].words ="@TRANSALPHA"
#p[714].words ="@TRANSHFLIP"
#p[715].words ="@TRANSPARENT"
#p[716].words ="@TRANSROTOZOOM"
#p[717].words ="@TRANSSCALED"
#p[718].words ="@TRANSSHADOW"
#p[719].words ="@TRANSVFLIP"
#p[720].words ="@TREEVIEW"
#p[721].words ="@TTF_ABSOLUTE"
#p[722].words ="@TTF_CENTERTIP"
#p[723].words ="@TTF_DI_SETITEM"
#p[724].words ="@TTF_IDISHWND"
#p[725].words ="@TTF_RTLREADING"
#p[726].words ="@TTF_SUBCLASS"
#p[727].words ="@TTF_TRACK"
#p[728].words ="@TTF_TRANSPARENT"
#p[729].words ="@TTN_GETDISPINFOA"
#p[730].words ="@TTN_GETDISPINFOW"
#p[731].words ="@TTN_POP"
#p[732].words ="@TTN_SHOW"
#p[733].words ="@TTS_ALWAYSTIP"
#p[734].words ="@TTS_BALLOON"
#p[735].words ="@TTS_NOANIMATE"
#p[736].words ="@TTS_NOFADE"
#p[737].words ="@TTS_NOPREFIX"
#p[738].words ="@TVNBEGINDRAG"
#p[739].words ="@TVNBEGINLABELEDIT"
#p[740].words ="@TVNBEGINRDRAG"
#p[741].words ="@TVNDELETEITEM"
#p[742].words ="@TVNENDLABELEDIT"
#p[743].words ="@TVNGETDISPINFO"
#p[744].words ="@TVNGETINFOTIP"
#p[745].words ="@TVNITEMEXPANDED"
#p[746].words ="@TVNITEMEXPANDING"
#p[747].words ="@TVNKEYDOWN"
#p[748].words ="@TVNSELCHANGED"
#p[749].words ="@TVNSELCHANGING"
#p[750].words ="@TVNSETDISPINFO"
#p[751].words ="@TVNSINGLEEXPAND"
#p[752].words ="@TVSCHECKBOXES"
#p[753].words ="@TVSDISABLEDRAGDROP"
#p[754].words ="@TVSEDITLABELS"
#p[755].words ="@TVSFULLROWSELECT"
#p[756].words ="@TVSHASBUTTONS"
#p[757].words ="@TVSHASLINES"
#p[758].words ="@TVSINFOTIP"
#p[759].words ="@TVSLINESATROOT"
#p[760].words ="@TVSNOHSCROLL"
#p[761].words ="@TVSNONEVENHEIGHT"
#p[762].words ="@TVSNOSCROLL"
#p[763].words ="@TVSNOTOOLTIPS"
#p[764].words ="@TVSRTLREADING"
#p[765].words ="@TVSSHOWSELALWAYS"
#p[766].words ="@TVSSINGLEEXPAND"
#p[767].words ="@TVSTRACKSELECT"
#p[768].words ="@TYPEBFILE"
#p[769].words ="@TYPEBITFIELD"
#p[770].words ="@TYPEBYTE"
#p[771].words ="@TYPECHAR"
#p[772].words ="@TYPEDIALOG"
#p[773].words ="@TYPEDOUBLE"
#p[774].words ="@TYPEFILE"
#p[775].words ="@TYPEFLOAT"
#p[776].words ="@TYPEINT"
#p[777].words ="@TYPEINT64"
#p[778].words ="@TYPEMEMORY"
#p[779].words ="@TYPEPOINTER"
#p[780].words ="@TYPESCHAR"
#p[781].words ="@TYPESTRING"
#p[782].words ="@TYPESWORD"
#p[783].words ="@TYPEUINT"
#p[784].words ="@TYPEUINT64"
#p[785].words ="@TYPEUSER"
#p[786].words ="@TYPEWINDOW"
#p[787].words ="@TYPEWORD"
#p[788].words ="@TYPEWSTRING"
#p[789].words ="@UDS_ALIGNLEFT"
#p[790].words ="@UDS_ALIGNRIGHT"
#p[791].words ="@UDS_ARROWKEYS"
#p[792].words ="@UDS_AUTOBUDDY"
#p[793].words ="@UDS_HORZ"
#p[794].words ="@UDS_HOTTRACK"
#p[795].words ="@UDS_NOTHOUSANDS"
#p[796].words ="@UDS_SETBUDDYINT"
#p[797].words ="@UDS_WRAP"
#p[798].words ="@USEDEFAULT"
#p[799].words ="@USERERROR"
#p[800].words ="@VFLIP"
#p[801].words ="@VSCROLL"
#p[802].words ="@WPARAM"
#p[803].words ="@XAXIS"
#p[804].words ="@YAXIS"
#p[805].words ="@ZAXIS"

'$
#p[806].words ="$ASM"
#p[807].words ="$DEFINE"
#p[808].words ="$ELIF"
#p[809].words ="$ELIFDEF"
#p[810].words ="$ELIFNDEF"
#p[811].words ="$ELSE"
#p[812].words ="$EMIT"
#p[813].words ="$ENDASM"
#p[814].words ="$ENDIF"
#p[815].words ="$ENDREGION"
#p[816].words ="$ERROR"
#p[817].words ="$IF"
#p[818].words ="$IFDEF"
#p[819].words ="$IFNDEF"
#p[820].words ="$INCLUDE"
#p[821].words ="$MACRO"
#p[822].words ="$MAIN"
#p[823].words ="$OPTION"
#p[824].words ="$REGION"
#p[825].words ="$TYPEDEF"
#p[826].words ="$UNDECLARE"
#p[827].words ="$UNDEF"
#p[828].words ="$USE"
#p[829].words ="$WARNING"
#p[830].words ="$WHEREDEFINED"

'A
#p[831].words ="ABS"
#p[832].words ="ACOS"
#p[833].words ="ACOSD"
#p[834].words ="ADDACCELERATOR"
#p[835].words ="ADDMENUITEM"
#p[836].words ="ADDSTRING"
#p[837].words ="ALIAS"
#p[838].words ="ALLOCHEAP"
#p[839].words ="ALLOCMEM"
#p[840].words ="AND"
#p[841].words ="ANIM_LOOP"
#p[842].words ="ANIM_ONCE"
#p[843].words ="ANIM_PINGPONG"
#p[844].words ="ANIM_STOP"
#p[845].words ="ANYTYPE"
#p[846].words ="APPEND$"
#p[847].words ="APPENDMENU"
#p[848].words ="AS"
#p[849].words ="ASC"
#p[850].words ="ASIN"
#p[851].words ="ASIND"
#p[852].words ="ATAN"
#p[853].words ="ATAND"
#p[854].words ="ATTACHBROWSER"
#p[855].words ="ATTACHSCREEN"
#p[856].words ="AUTODEFINE"

'B
#p[857].words ="BACKBUFFER"
#p[858].words ="BACKPEN"
#p[859].words ="BASELEN"
#p[860].words ="BEGININSERTMENU"
#p[861].words ="BEGINMENU"
#p[862].words ="BEGINPOPUP"
#p[863].words ="BFILE"
#p[864].words ="BPP"
#p[865].words ="BREAK"
#p[866].words ="BREAKFOR"
#p[867].words ="BROWSECMD"
#p[868].words ="BYREF"
#p[869].words ="BYVAL"

'C
#p[870].words ="CALENDARCONTROL"
#p[871].words ="CALL"
#p[872].words ="CALLOBJECTMETHOD"
#p[873].words ="CASE"
#p[874].words ="CASE&"
#p[875].words ="CATCH"
#p[876].words ="CBEADDSTRING"
#p[877].words ="CBEDELETESTRING"
#p[878].words ="CBEGETSELECTED"
#p[879].words ="CBEGETSTRING"
#p[880].words ="CBEGETSTRINGCOUNT"
#p[881].words ="CBEINSERTSTRING"
#p[882].words ="CBESETIMAGELIST"
#p[883].words ="CBESETINDENT"
#p[884].words ="CBESETSELECTED"
#p[885].words ="CCGETCOLOR"
#p[886].words ="CCGETCURSEL"
#p[887].words ="CCGETFIRSTDAYOFWEEK"
#p[888].words ="CCGETMINIMUMRECT"
#p[889].words ="CCGETSCROLLDELTA"
#p[890].words ="CCGETTODAY"
#p[891].words ="CCSETCOLOR"
#p[892].words ="CCSETCURSEL"
#p[893].words ="CCSETFIRSTDAYOFWEEK"
#p[894].words ="CCSETSCROLLDELTA"
#p[895].words ="CCSETTODAY"
#p[896].words ="CDECL"
#p[897].words ="CEIL"
#p[898].words ="CENTERWINDOW"
#p[899].words ="CHAR"
#p[900].words ="CHECKDROPFORMAT"
#p[901].words ="CHECKMENUITEM"
#p[902].words ="CHR$"
#p[903].words ="CIRCLE"
#p[904].words ="CLASS"
#p[905].words ="CLEAR"
#p[906].words ="CLOSECONSOLE"
#p[907].words ="CLOSEDIALOG"
#p[908].words ="CLOSEFILE"
#p[909].words ="CLOSEPRINTER"
#p[910].words ="CLOSESCREEN"
#p[911].words ="CLOSEWINDOW"
#p[912].words ="CLS"
#p[913].words ="COLOR"
#p[914].words ="COLORREQUEST"
#p[915].words ="COM"
#p[916].words ="COMBOBOXEX"
#p[917].words ="COMENUMBEGIN"
#p[918].words ="COMENUMNEXT"
#p[919].words ="COMGETLASTERROR"
#p[920].words ="COMREF"
#p[921].words ="CONST"
#p[922].words ="CONTEXTMENU"
#p[923].words ="CONTROL"
#p[924].words ="CONTROLCMD"
#p[925].words ="CONTROLEX"
#p[926].words ="CONTROLEXISTS"
#p[927].words ="COPYFILE"
#p[928].words ="COPYRGN"
#p[929].words ="COS"
#p[930].words ="COSD"
#p[931].words ="COSH"
#p[932].words ="COSHD"
#p[933].words ="CREATE"
#p[934].words ="CREATE3DSCREEN"
#p[935].words ="CREATECOMOBJECT"
#p[936].words ="CREATEDIALOG"
#p[937].words ="CREATEDIR"
#p[938].words ="CREATEMAPDATA"
#p[939].words ="CREATEMENU"
#p[940].words ="CREATEREGKEY"
#p[941].words ="CREATESCREEN"
#p[942].words ="CREATESPRITE"

'D
#p[943].words ="D3DCAMERA"
#p[944].words ="D3DCOMMAND"
#p[945].words ="D3DDELETE"
#p[946].words ="D3DLIGHT"
#p[947].words ="D3DMOVE"
#p[948].words ="D3DRENDER"
#p[949].words ="D3DSCENE"
#p[950].words ="D3DSETQUALITY"
#p[951].words ="D3DSETRENDERMODE"
#p[952].words ="D3DSHAPE"
#p[953].words ="DATA"
#p[954].words ="DATABEGIN"
#p[955].words ="DATABLOCK"
#p[956].words ="DATAEND"
#p[957].words ="DATE$"
#p[958].words ="DATETIMEPICKER"
#p[959].words ="DBBINDDATE"
#p[960].words ="DBBINDDATEPARAM"
#p[961].words ="DBBINDPARAMETER"
#p[962].words ="DBBINDTIME"
#p[963].words ="DBBINDTIMEPARAM"
#p[964].words ="DBBINDTIMESTAMP"
#p[965].words ="DBBINDTIMESTAMPPARAM"
#p[966].words ="DBBINDVARIABLE"
#p[967].words ="DBCARDINALITY"
#p[968].words ="DBCONNECT"
#p[969].words ="DBCONNECTDSN"
#p[970].words ="DBCREATEMDBDISCONNECT"
#p[971].words ="DBENUMDRIVERS"
#p[972].words ="DBEXECSQL"
#p[973].words ="DBEXECUTE"
#p[974].words ="DBFREESQL"
#p[975].words ="DBGET"
#p[976].words ="DBGETDATA"
#p[977].words ="DBGETDATE"
#p[978].words ="DBGETERRORCODE"
#p[979].words ="DBGETERRORTEXT"
#p[980].words ="DBGETFIRST"
#p[981].words ="DBGETLAST"
#p[982].words ="DBGETNEXT"
#p[983].words ="DBGETNUMCOLS"
#p[984].words ="DBGETPREV"
#p[985].words ="DBGETTIME"
#p[986].words ="DBGETTIMESTAMP"
#p[987].words ="DBISNULL"
#p[988].words ="DBLISTCOLUMNS"
#p[989].words ="DBLISTTABLES"
#p[990].words ="DBPREPARESQL"
#p[991].words ="DEBUGPRINT"
#p[992].words ="DECLARE"
#p[993].words ="DEF"
#p[994].words ="DEFAULT"
#p[995].words ="DEFINE_GUID"
#p[996].words ="DELETE"
#p[997].words ="DELETEFILE"
#p[998].words ="DELETEIMAGE"
#p[999].words ="DELETEREGKEY"
#p[1000].words ="DELETERGN"
#p[1001].words ="DELETESTRING"
#p[1002].words ="DIALOG"
#p[1003].words ="DICTADD"
#p[1004].words ="DICTCREATE"
#p[1005].words ="DICTFREE"
#p[1006].words ="DICTGETKEY"
#p[1007].words ="DICTGETNEXTASSOC"
#p[1008].words ="DICTGETSTARTASSOC"
#p[1009].words ="DICTGETVALUE"
#p[1010].words ="DICTLOOKUP"
#p[1011].words ="DICTREMOVE"
#p[1012].words ="DICTREMOVEALL"
#p[1013].words ="DIM"
#p[1014].words ="DO"
#p[1015].words ="DOMODAL"
#p[1016].words ="DOUBLE"
#p[1017].words ="DRAWAALINE"
#p[1018].words ="DRAWALPHALINE"
#p[1019].words ="DRAWFILLEDRECT"
#p[1020].words ="DRAWLINE"
#p[1021].words ="DRAWMAP"
#p[1022].words ="DRAWMODE"
#p[1023].words ="DRAWRECT"
#p[1024].words ="DRAWSPRITE"
#p[1025].words ="DRAWSPRITEXY"
#p[1026].words ="DTPGETMCCOLOR"
#p[1027].words ="DTPGETSYSTEMTIME"
#p[1028].words ="DTPSETFORMAT"
#p[1029].words ="DTPSETMCCOLOR"
#p[1030].words ="DTPSETSYSTEMTIME"
#p[1031].words ="DXCREATEMAP"
#p[1032].words ="DXDRAWALLSPRITES"
#p[1033].words ="DXDRAWMAP"
#p[1034].words ="DXDRAWSPRITE"
#p[1035].words ="DXENDTRY"
#p[1036].words ="DXFILL"
#p[1037].words ="DXFLIP"
#p[1038].words ="DXGETMAPCOUNT"
#p[1039].words ="DXGETMAPHEIGHT"
#p[1040].words ="DXGETMAPTILE"
#p[1041].words ="DXGETMAPWIDTH"
#p[1042].words ="DXGETSPRITEDATA"
#p[1043].words ="DXHITANY"
#p[1044].words ="DXHITSPRITE"
#p[1045].words ="DXHITSPRITETILE"
#p[1046].words ="DXLOADMAP"
#p[1047].words ="DXLOADPALETTE"
#p[1048].words ="DXMOVEMAP"
#p[1049].words ="DXMOVESPRITE"
#p[1050].words ="DXNEWMAP"
#p[1051].words ="DXREMOVESPRITE"
#p[1052].words ="DXSAVEMAP"
#p[1053].words ="DXSCROLLMAP"
#p[1054].words ="DXSETCOLOR"
#p[1055].words ="DXSETMAPTILE"
#p[1056].words ="DXSETSPRITEDATA"
#p[1057].words ="DXSPRITE"
#p[1058].words ="DXTRY"
#p[1059].words ="DYNAMIC_CAST"

'E
#p[1060].words ="EACH"
#p[1061].words ="ELLIPSE"
#p[1062].words ="ELSE"
#p[1063].words ="ELSEIF"
#p[1064].words ="ENABLECONTROL"
#p[1065].words ="ENABLEMENU"
#p[1066].words ="ENABLEMENUITEM"
#p[1067].words ="ENABLETABS"
#p[1068].words ="END"
#p[1069].words ="ENDCATCH"
#p[1070].words ="ENDCLASS"
#p[1071].words ="ENDENUM"
#p[1072].words ="ENDIF"
#p[1073].words ="ENDINTERFACE"
#p[1074].words ="ENDMENU"
#p[1075].words ="ENDPAGE"
#p[1076].words ="ENDPOPUP"
#p[1077].words ="ENDREGION"
#p[1078].words ="ENDSELECT"
#p[1079].words ="ENDSUB"
#p[1080].words ="ENDTRY"
#p[1081].words ="ENDTYPE"
#p[1082].words ="ENDUNION"
#p[1083].words ="ENDWHILE"
#p[1084].words ="ENDWITH"
#p[1085].words ="ENTER"
#p[1086].words ="ENUM"   '<----------------
#p[1087].words ="EOF" '<----------------
#p[1088].words ="ESC"
#p[1089].words ="EXECUTE"
#p[1090].words ="EXP"
#p[1091].words ="EXPORT"
#p[1092].words ="EXSTYLE"
#p[1093].words ="EXTERN"

'F
#p[1094].words ="FACOS"
#p[1095].words ="FACOSD"
#p[1096].words ="FADE"
#p[1097].words ="FADEPALETTE"
#p[1098].words ="FASIN"
#p[1099].words ="FASIND"
#p[1100].words ="FATAN"
#p[1101].words ="FATAND"
#p[1102].words ="FCOS"
#p[1103].words ="FCOSD"
#p[1104].words ="FCOSH"
#p[1105].words ="FCOSHD"
#p[1106].words ="FILE"
#p[1107].words ="FILEREQUEST"
#p[1108].words ="FILL_POINT"
#p[1109].words ="FILL_SOLID"
#p[1110].words ="FILL_WIREFRAME"
#p[1111].words ="FILLPALETTE"
#p[1112].words ="FILLSCREEN"
#p[1113].words ="FINDCLOSE"
#p[1114].words ="FINDNEXT"
#p[1115].words ="FINDOPEN"
#p[1116].words ="FLIP"
#p[1117].words ="FLOAT"
#p[1118].words ="FLOODFILL"
#p[1119].words ="FLOOR"
#p[1120].words ="FLT"
#p[1121].words ="FLUSHKEYS"
#p[1122].words ="FONTREQUEST"
#p[1123].words ="FOR"
#p[1124].words ="FREECOMSTRING"
#p[1125].words ="FREEHEAP"
#p[1126].words ="FREELIB"
#p[1127].words ="FREEMAP"
#p[1128].words ="FREEMEM"
#p[1129].words ="FREESPRITE"
#p[1130].words ="FRONTBUFFER"
#p[1131].words ="FRONTPEN"
#p[1132].words ="FSIN"
#p[1133].words ="FSIND"
#p[1134].words ="FSINH"
#p[1135].words ="FSINHD"
#p[1136].words ="FTAN"
#p[1137].words ="FTAND"
#p[1138].words ="FTANH"
#p[1139].words ="FTANHD"

'G
#p[1140].words ="GDI32"
#p[1141].words ="GET"
#p[1142].words ="GETBITMAPSIZE"
#p[1143].words ="GETBROWSERINTERFACE"
#p[1144].words ="GETBUFFERHEIGHT"
#p[1145].words ="GETBUFFERPITCH"
#p[1146].words ="GETBUFFERPOINTER"
#p[1147].words ="GETBUFFERWIDTH"
#p[1148].words ="GETCAPTION"
#p[1149].words ="GETCARETPOSITION"
#p[1150].words ="GETCLIENTSIZE"
#p[1151].words ="GETCOMOBJECT"
#p[1152].words ="GETCOMPROPERTY"
#p[1153].words ="GETCONTROLHANDLE"
#p[1154].words ="GETCONTROLTEXT"
#p[1155].words ="GETDATA"
#p[1156].words ="GETDEFAULTPRINTER"
#p[1157].words ="GETDRAGKEYSTATE"
#p[1158].words ="GETDRAGPOINT"
#p[1159].words ="GETDROPDATA"
#p[1160].words ="GETDXVERSION"
#p[1161].words ="GETEXCEPTIONCODE"
#p[1162].words ="GETEXCEPTIONINFORMATION"
#p[1163].words ="GETFOLDERPATH"
#p[1164].words ="GETHDC"
#p[1165].words ="GETJOYSTICKAXISCOUNT"
#p[1166].words ="GETJOYSTICKBUTTONCOUNT"
#p[1167].words ="GETJOYSTICKCOUNT"
#p[1168].words ="GETJOYSTICKNAME"
#p[1169].words ="GETJOYSTICKTYPE"
#p[1170].words ="GETKEY"
#p[1171].words ="GETKEYSTATE"
#p[1172].words ="GETMAPCOUNT"
#p[1173].words ="GETMAPDATA"
#p[1174].words ="GETMAPHEIGHT"
#p[1175].words ="GETMAPPIXELHEIGHT"
#p[1176].words ="GETMAPPIXELWIDTH"
#p[1177].words ="GETMAPWIDTH"
#p[1178].words ="GETPALETTECOLOR"
#p[1179].words ="GETPIXEL"
#p[1180].words ="GETPOSITION"
#p[1181].words ="GETPROGRESSPOSITION"
#p[1182].words ="GETRESOURCELENGTH"
#p[1183].words ="GETSCREENSIZE"
#p[1184].words ="GETSCROLLPOS"
#p[1185].words ="GETSCROLLRANGE"
#p[1186].words ="GETSELECTED"
#p[1187].words ="GETSIZE"
#p[1188].words ="GETSPINNERBASE"
#p[1189].words ="GETSPINNERBUDDY"
#p[1190].words ="GETSPINNERPOSITION"
#p[1191].words ="GETSPINNERRANGEMAX"
#p[1192].words ="GETSPINNERRANGEMIN"
#p[1193].words ="GETSPRITEDELAY"
#p[1194].words ="GETSPRITEFRAMES"
#p[1195].words ="GETSPRITEHEIGHT"
#p[1196].words ="GETSPRITEPITCH"
#p[1197].words ="GETSPRITEPOINTER"
#p[1198].words ="GETSPRITESTATE"
#p[1199].words ="GETSPRITETYPE"
#p[1200].words ="GETSPRITEVELX"
#p[1201].words ="GETSPRITEVELY"
#p[1202].words ="GETSPRITEWIDTH"
#p[1203].words ="GETSTARTPATH"
#p[1204].words ="GETSTARTPATHW"
#p[1205].words ="GETSTATE"
#p[1206].words ="GETSTRING"
#p[1207].words ="GETSTRINGCOUNT"
#p[1208].words ="GETTEXTSIZE"
#p[1209].words ="GETTHUMBPOS"
#p[1210].words ="GETTRACKBARLINESIZE"
#p[1211].words ="GETTRACKBARPAGESIZE"
#p[1212].words ="GETTRACKBARPOSITION"
#p[1213].words ="GETTRACKBARRANGEMAX"
#p[1214].words ="GETTRACKBARRANGEMIN"
#p[1215].words ="GETUSERDATA"
#p[1216].words ="GLOBAL"
#p[1217].words ="GOSUB"
#p[1218].words ="GOTO"
#p[1219].words ="GUID"

'H
#p[1220].words ="HCDELETEITEM"
#p[1221].words ="HCGETITEMCOUNT"
#p[1222].words ="HCGETITEMDATA"
#p[1223].words ="HCGETITEMRECT"
#p[1224].words ="HCGETITEMTEXT"
#p[1225].words ="HCGETITEMWIDTH"
#p[1226].words ="HCINSERTITEM"
#p[1227].words ="HCSETIMAGELIST"
#p[1228].words ="HCSETITEMDATA"
#p[1229].words ="HCSETITEMJUSTIFY"
#p[1230].words ="HCSETITEMTEXT"
#p[1231].words ="HCSETITEMWIDTH"
#p[1232].words ="HEADERCONTROL"
#p[1233].words ="HEAP"
#p[1234].words ="HEAPCLEAR"
#p[1235].words ="HEX$"

'I
#p[1236].words ="IF"
#p[1237].words ="IMPLEMENTS"
#p[1238].words ="IMPORT"
#p[1239].words ="INKEY$"
#p[1240].words ="INPUT"
#p[1241].words ="INSERT"
#p[1242].words ="INSERTMENU"
#p[1243].words ="INSERTSTRING"
#p[1244].words ="INSTR"
#p[1245].words ="INT"
#p[1246].words ="INT64"
#p[1247].words ="INTERFACE"
#p[1248].words ="INTRAND"
#p[1249].words ="IPCLEARADDRESS"
#p[1250].words ="IPCONTROL"
#p[1251].words ="IPGETADDRESS"
#p[1252].words ="IPGETADDRESSDWORD"
#p[1253].words ="IPISBLANK"
#p[1254].words ="IPSETADDRESS"
#p[1255].words ="IPSETADDRESSDWORD"
#p[1256].words ="IPSETRANGE"
#p[1257].words ="ISARRAY"
#p[1258].words ="ISREF"
#p[1259].words ="ISSELECTED"
#p[1260].words ="ISTRING"
#p[1261].words ="ISWINDOWCLOSED"
#p[1262].words ="ISWINDOWHIDDEN"
#p[1263].words ="ITSTRING"
#p[1264].words ="IWSTRING"

'J
#p[1265].words ="JOYDOWN"
#p[1266].words ="JOYX"
#p[1267].words ="JOYY"
#p[1268].words ="JOYZ"
#p[1269].words ="JUMP"

'K
#p[1270].words ="KERNEL32"
#p[1271].words ="KEYDOWN"

'L
#p[1272].words ="LABEL"
#p[1273].words ="LCASE$"
#p[1274].words ="LEAVE"
#p[1275].words ="LEFT$"
#p[1276].words ="LEN"
#p[1277].words ="LET"
#p[1278].words ="LINE"
#p[1279].words ="LINETO"
#p[1280].words ="LINKEDLIST"
#p[1281].words ="LISTADD"
#p[1282].words ="LISTADDHEAD"
#p[1283].words ="LISTCREATE"
#p[1284].words ="LISTGETDATA"
#p[1285].words ="LISTGETFIRST"
#p[1286].words ="LISTGETNEXT"
#p[1287].words ="LISTGETPOS"
#p[1288].words ="LISTREMOVE"
#p[1289].words ="LISTREMOVEALL"
#p[1290].words ="LOADIMAGE"
#p[1291].words ="LOADMAPDATA"
#p[1292].words ="LOADMENU"
#p[1293].words ="LOADPALETTE"
#p[1294].words ="LOADRESOURCE"
#p[1295].words ="LOADSPRITE"
#p[1296].words ="LOADTOOLBAR"
#p[1297].words ="LOCATE"
#p[1298].words ="LOCK"
#p[1299].words ="LOCKBUFFER"
#p[1300].words ="LOCKSPRITE"
#p[1301].words ="LOG"
#p[1302].words ="LOG10"
#p[1303].words ="LOGFONT"
#p[1304].words ="LOGPEN"
#p[1305].words ="LTRIM$"
#p[1306].words ="LVKEYDOWN"
#p[1307].words ="LVN_ENDLABELEDIT"

'M
#p[1308].words ="MAPDRAWMODE"
#p[1309].words ="MAPMASKCOLOR"
#p[1310].words ="MATRIXIDENTITY"
#p[1311].words ="MATRIXMULTIPLY"
#p[1312].words ="MATRIXROTATION"
#p[1313].words ="MATRIXTRANSLATION"
#p[1314].words ="MEMORY"
#p[1315].words ="MENU"
#p[1316].words ="MENUITEM"
#p[1317].words ="MENUTITLE"
#p[1318].words ="MESSAGEBOX"
#p[1319].words ="MID$"
#p[1320].words ="MILLISECS"
#p[1321].words ="MODIFY"
#p[1322].words ="MODIFYEXSTYLE"
#p[1323].words ="MODIFYSTYLE"
#p[1324].words ="MOUSEDOWN"
#p[1325].words ="MOUSEX"
#p[1326].words ="MOUSEY"
#p[1327].words ="MOVE"
#p[1328].words ="MOVEMAP"
#p[1329].words ="MOVESPRITE"

'N
#p[1330].words ="NEW"
#p[1331].words ="NEWMAP"
#p[1332].words ="NEXT"
#p[1333].words ="NMHDR"
#p[1334].words ="NOT"
#p[1335].words ="NULL"

'O
#p[1336].words ="OEM"
#p[1337].words ="OFFSETOF"
#p[1338].words ="ON"
#p[1339].words ="ONCONTROL"
#p[1340].words ="ONEXIT"
#p[1341].words ="ONMENUPICK"
#p[1342].words ="ONMESSAGE"
#p[1343].words ="OPENCONSOLE"
#p[1344].words ="OPENFILE"
#p[1345].words ="OPENPRINTER"
#p[1346].words ="OPENWINDOW"
#p[1347].words ="OPT"
#p[1348].words ="OR"

'P
#p[1349].words ="PAGERCONTROL"
#p[1350].words ="PALETTEINDEX"
#p[1351].words ="PCFORWARDMOUSE"
#p[1352].words ="PCGETBUTTONSTATE"
#p[1353].words ="PCGETPOS"
#p[1354].words ="PCRECALCSIZE"
#p[1355].words ="PCSETBACKCOLOR"
#p[1356].words ="PCSETBORDERSIZE"
#p[1357].words ="PCSETBUTTONSIZE"
#p[1358].words ="PCSETCHILD"
#p[1359].words ="PCSETCHILDHWND"
#p[1360].words ="PCSETPOS"
#p[1361].words ="PLAYMIDI$"
#p[1362].words ="PLAYWAVE"
#p[1363].words ="POINT"
#p[1364].words ="POINTER"
#p[1365].words ="POPHEAP"
#p[1366].words ="POPUP"
#p[1367].words ="PRINT"
#p[1368].words ="PRINTWINDOW"
#p[1369].words ="PRIVATE"
#p[1370].words ="PROGRESSCONTROL"
#p[1371].words ="PROGRESSSTEPIT"
#p[1372].words ="PROJECTGLOBAL"
#p[1373].words ="PROTECTED"
#p[1374].words ="PRTDIALOG"
#p[1375].words ="PSET"
#p[1376].words ="PUBLIC"
#p[1377].words ="PUSHHEAP"
#p[1378].words ="PUT"

'R
#p[1379].words ="RAND"
#p[1380].words ="RASTERMODE"
#p[1381].words ="RBADDBAND"
#p[1382].words ="RBSETBANDBITMAP"
#p[1383].words ="RBSETBANDCHILD"
#p[1384].words ="RBSETBANDCHILDHANDLE"
#p[1385].words ="RBSETBANDCOLORS"
#p[1386].words ="RBSETBANDTEXT"
#p[1387].words ="RBSHOWBAND"
#p[1388].words ="READ"
#p[1389].words ="READMEM"
#p[1390].words ="READPIXEL"
#p[1391].words ="REALLOCHEAP"
#p[1392].words ="REBARCONTROL"
#p[1393].words ="RECT"
#p[1394].words ="REDRAWFRAME"
#p[1395].words ="REGGETDWORD"
#p[1396].words ="REGGETSTRING"
#p[1397].words ="REGION"
#p[1398].words ="REGISTERDROPTARGET"
#p[1399].words ="REGSETDWORD"
#p[1400].words ="REGSETSTRING"
#p[1401].words ="RELEASEHDC"
#p[1402].words ="REM"
#p[1403].words ="REMOVEDIR"
#p[1404].words ="REMOVEDROPTARGET"
#p[1405].words ="REMOVEMENUITEM"
#p[1406].words ="REPLACE$"
#p[1407].words ="RESTORE"
#p[1408].words ="RETURN"
#p[1409].words ="RGB"
#p[1410].words ="RGBA"
#p[1411].words ="RGBTOSCREEN"
#p[1412].words ="RGNFROMBITMAP"
#p[1413].words ="RIGHT"
#p[1414].words ="RIGHT$"
#p[1415].words ="RND"
#p[1416].words ="ROTOZOOM"
#p[1417].words ="RTIMAGE"
#p[1418].words ="RTRIM$"

'S
#p[1419].words ="S2W"
#p[1420].words ="SAVEMAPDATA"
#p[1421].words ="SCHAR"
#p[1422].words ="SCREEN"
#p[1423].words ="SCROLL"
#p[1424].words ="SCROLLMAP"
#p[1425].words ="SEEDRND"
#p[1426].words ="SEEK"
#p[1427].words ="SELECT"
#p[1428].words ="SENDMESSAGE"
#p[1429].words ="SEPARATOR"
#p[1430].words ="SET_INTERFACE"
#p[1431].words ="SETBUTTONBITMAPS"
#p[1432].words ="SETBUTTONBORDER"
#p[1433].words ="SETBUTTONRGN"
#p[1434].words ="SETCAPTION"
#p[1435].words ="SETCOMPROPERTY"
#p[1436].words ="SETCONTROLCOLOR"
#p[1437].words ="SETCONTROLNOTIFY"
#p[1438].words ="SETCONTROLTEXT"
#p[1439].words ="SETCONTROLTEXTW"
#p[1440].words ="SETCURSOR"
#p[1441].words ="SETEXITCODE"
#p[1442].words ="SETFOCUS"
#p[1443].words ="SETFONT"
#p[1444].words ="SETHORIZEXTENT"
#p[1445].words ="SETHTCOLOR"
#p[1446].words ="SETICON"
#p[1447].words ="SETID"
#p[1448].words ="SETJOYSTICKDEADZONE"
#p[1449].words ="SETJOYSTICKRANGE"
#p[1450].words ="SETLBCOLWIDTH"
#p[1451].words ="SETLINESTYLE"
#p[1452].words ="SETMAPDATA"
#p[1453].words ="SETMAPVIEWPORT"
#p[1454].words ="SETMENU"
#p[1455].words ="SETPALETTECOLOR"
#p[1456].words ="SETPRECISION"
#p[1457].words ="SETPROGRESSBARCOLOR"
#p[1458].words ="SETPROGRESSDELTA"
#p[1459].words ="SETPROGRESSMARQUEE"
#p[1460].words ="SETPROGRESSPOSITION"
#p[1461].words ="SETPROGRESSRANGE"
#p[1462].words ="SETPROGRESSSTEP"
#p[1463].words ="SETSCROLLPOS"
#p[1464].words ="SETSCROLLRANGE"
#p[1465].words ="SETSELECTED"
#p[1466].words ="SETSIZE"
#p[1467].words ="SETSPINNERBASE"
#p[1468].words ="SETSPINNERBUDDY"
#p[1469].words ="SETSPINNERPOSITION"
#p[1470].words ="SETSPINNERRANGE"
#p[1471].words ="SETSPRITEDELAY"
#p[1472].words ="SETSPRITESTATE"
#p[1473].words ="SETSPRITETYPE"
#p[1474].words ="SETSPRITEVELX"
#p[1475].words ="SETSPRITEVELY"
#p[1476].words ="SETSTATE"
#p[1477].words ="SETTRACKBARLINESIZE"
#p[1478].words ="SETTRACKBARPAGESIZE"
#p[1479].words ="SETTRACKBARPOSITION"
#p[1480].words ="SETTRACKBARRANGE"
#p[1481].words ="SETTRACKBARTHUMBLENGTH"
#p[1482].words ="SETTRACKBARTICKFREQ"
#p[1483].words ="SETTYPE"
#p[1484].words ="SETUSERDATA"
#p[1485].words ="SETWINDOW"
#p[1486].words ="SETWINDOWCOLOR"
#p[1487].words ="SGN"
#p[1488].words ="SHELL32"
#p[1489].words ="SHOWCONTEXTMENU"
#p[1490].words ="SHOWDIALOG"
#p[1491].words ="SHOWIMAGE"
#p[1492].words ="SHOWWINDOW"
#p[1493].words ="SIN"
#p[1494].words ="SIND"
#p[1495].words ="SINH"
#p[1496].words ="SINHD"
#p[1497].words ="SIZEOF"
#p[1498].words ="SPACE$"
#p[1499].words ="SPINNERCONTROL"
#p[1500].words ="SPRITEALPHA"
#p[1501].words ="SPRITEANGLE"
#p[1502].words ="SPRITECOLLIDED"
#p[1503].words ="SPRITECOLLIDEDEX"
#p[1504].words ="SPRITEDRAWMODE"
#p[1505].words ="SPRITEFRAME"
#p[1506].words ="SPRITEMASKCOLOR"
#p[1507].words ="SPRITESCALEFACTOR"
#p[1508].words ="SPRITESHADOWOFFSET"
#p[1509].words ="SPRITETOBUFFER"
#p[1510].words ="SQRT"
#p[1511].words ="STARTDRAGDROP"
#p[1512].words ="STARTTIMER"
#p[1513].words ="STATIC"
#p[1514].words ="STATIC_CAST"
#p[1515].words ="STDMETHOD"
#p[1516].words ="STEP"
#p[1517].words ="STOP"
#p[1518].words ="STOPMIDI$"
#p[1519].words ="STOPTIMER"
#p[1520].words ="STR$"
#p[1521].words ="STRING"
#p[1522].words ="STRING$"
#p[1523].words ="SUB"
#p[1524].words ="SWORD"
#p[1525].words ="SYSTEM"

'T
#p[1526].words ="TABCONTROL"
#p[1527].words ="TAN"
#p[1528].words ="TAND"
#p[1529].words ="TANH"
#p[1530].words ="TANHD"
#p[1531].words ="TCDELETEALLTABS"
#p[1532].words ="TCDELETETAB"
#p[1533].words ="TCGETFOCUSTAB"
#p[1534].words ="TCGETITEMDATA"
#p[1535].words ="TCGETROWCOUNT"
#p[1536].words ="TCGETSELECTEDTAB"
#p[1537].words ="TCGETTABCOUNT"
#p[1538].words ="TCGETTABTEXT"
#p[1539].words ="TCHIGHLIGHTTAB"
#p[1540].words ="TCHITTEST"
#p[1541].words ="TCINSERTTAB"
#p[1542].words ="TCSETFOCUSTAB"
#p[1543].words ="TCSETIMAGE"
#p[1544].words ="TCSETIMAGELIST"
#p[1545].words ="TCSETITEMDATA"
#p[1546].words ="TCSETMINTABSIZE"
#p[1547].words ="TCSETSELECTEDTAB"
#p[1548].words ="TCSETTABTEXT"
#p[1549].words ="TCSETTIP"
#p[1550].words ="THEN"
#p[1551].words ="THIS"
#p[1552].words ="THREAD"
#p[1553].words ="THROW"
#p[1554].words ="TIME$"
#p[1555].words ="TIMER"
#p[1556].words ="TO"
#p[1557].words ="TOOLTIPCONTROL"
#p[1558].words ="TRACKBARCONTROL"
#p[1559].words ="TRY"
#p[1560].words ="TSTRING"
#p[1561].words ="TTADDTOOL"
#p[1562].words ="TTDELETETOOL"
#p[1563].words ="TTRELAYMESSAGE"
#p[1564].words ="TTSETTOOLRECT"
#p[1565].words ="TVDELETEALLITEMS"
#p[1566].words ="TVDELETEITEM"
#p[1567].words ="TVGETITEMDATA"
#p[1568].words ="TVGETITEMTEXT"
#p[1569].words ="TVGETSELECTEDITEM"
#p[1570].words ="TVINSERTITEM"
#p[1571].words ="TVSELECTITEM"
#p[1572].words ="TVSETITEMDATA"
#p[1573].words ="TVSETITEMTEXT"
#p[1574].words ="TYPE"
#p[1575].words ="TYPE_NAME"
#p[1576].words ="TYPEDEF"
#p[1577].words ="TYPEOF"

'U
#p[1578].words ="UCASE$"
#p[1579].words ="UINT"
#p[1580].words ="UINT64"
#p[1581].words ="UNION"
#p[1582].words ="UNLOCKBUFFER"
#p[1583].words ="UNLOCKSPRITE"
#p[1584].words ="UNTIL"
#p[1585].words ="USER"
#p[1586].words ="USER32"
#p[1587].words ="USING"

'V
#p[1588].words ="VAL"
#p[1589].words ="VEC3ADD"
#p[1590].words ="VEC3CROSS"
#p[1591].words ="VEC3DOT"
#p[1592].words ="VEC3LENGTH"
#p[1593].words ="VEC3LERP"
#p[1594].words ="VEC3NORMALIZE"
#p[1595].words ="VEC3SUB"
#p[1596].words ="VEC4ADD"
#p[1597].words ="VEC4CROSS"
#p[1598].words ="VEC4DOT"
#p[1599].words ="VEC4LENGTH"
#p[1600].words ="VEC4LERP"
#p[1601].words ="VEC4NORMALIZE"
#p[1602].words ="VEC4SUB"
#p[1603].words ="VIRTUAL"
#p[1604].words ="VOID"
#p[1605].words ="VSYNC"

'W
#p[1606].words ="W2S"
#p[1607].words ="WAIT"
#p[1608].words ="WAITCON"
#p[1609].words ="WAITKEY"
#p[1610].words ="WAITUNTIL"
#p[1611].words ="WAPPEND$"
#p[1612].words ="WCHR$"
#p[1613].words ="WEND"
#p[1614].words ="WHEAP"
#p[1615].words ="WHERE"
#p[1616].words ="WHEX$"
#p[1617].words ="WHILE"
#p[1618].words ="WINDOW"
#p[1619].words ="WINSTR"
#p[1620].words ="WINTECT"
#p[1621].words ="WITH"
#p[1622].words ="WLCASE$"
#p[1623].words ="WLEFT$"
#p[1624].words ="WLTRIM$"
#p[1625].words ="WM_GETTEXT"
#p[1626].words ="WM_KILLFOCUS"
#p[1627].words ="WM_SETFOCUS"
#p[1628].words ="WM_SETTEXT"
#p[1629].words ="WMID$"
#p[1630].words ="WORD"
#p[1631].words ="WRIGHT$"
#p[1632].words ="WRITE"
#p[1633].words ="WRITEALPHAPIXEL"
#p[1634].words ="WRITEMEM"
#p[1635].words ="WRITEPIXEL"
#p[1636].words ="WRITEPIXELFAST"
#p[1637].words ="WRITEPRINTER"
#p[1638].words ="WRITETEXT"
#p[1639].words ="WRTRIM$"
#p[1640].words ="WSPACE$"
#p[1641].words ="WSTR$"
#p[1642].words ="WSTRING"
#p[1643].words ="WSTRING$"
#p[1644].words ="WUCASE$"
#p[1645].words ="WUSING"
#p[1646].words ="WVAL"

'_
#p[1647].words = "__ASM"
#p[1648].words = "__DELETE"
#p[1649].words = "__GET"
#p[1650].words = "__NEW"
#p[1651].words = "__POWER"
#p[1652].words = "__PUT"
#p[1653].words = "__READ"
#p[1654].words = "__READMEM"
#p[1655].words = "__WRITE"
#p[1656].words = "__WRITEMEM"
#p[1657].words = "_ASM"
#p[1658].words = "_DUP$"
#p[1659].words = "_ENDASM"
#p[1660].words = "_WDUPSTR"
#p[1661].words = "_WSTRAPPEND"

SetKeyWordColours()

RETURN 0
ENDSUB

sub SetKeyWordColours()

'@ key words
FOR a = 1 TO 805
    #Attrib[a].Colour = KeyWordColourAt
NEXT a

'$
FOR a = 806 TO 830
    #Attrib[a].Colour = KeyWordColourDollar
NEXT a

'A to Z
FOR a = 831 TO 1646
    #Attrib[a].Colour = KeyWordColourAtoZ
NEXT a

'_
FOR a = 1647 TO 1661
    #Attrib[a].Colour = KeyWordColourOther
NEXT a


'Variable types
#Attrib[899].Colour  = KeyWordColourVariables 'char
#Attrib[863].Colour  = KeyWordColourVariables 'bfile
#Attrib[1245].Colour = KeyWordColourVariables 'int
#Attrib[1246].Colour = KeyWordColourVariables 'int64
#Attrib[1260].Colour = KeyWordColourVariables 'istring
#Attrib[1521].Colour = KeyWordColourVariables 'string
#Attrib[1630].Colour = KeyWordColourVariables 'word
#Attrib[1524].Colour = KeyWordColourVariables 'sword
#Attrib[1579].Colour = KeyWordColourVariables 'uint
#Attrib[1580].Colour = KeyWordColourVariables 'uint64
#Attrib[1117].Colour = KeyWordColourVariables 'float
#Attrib[1016].Colour = KeyWordColourVariables 'double
#Attrib[1642].Colour = KeyWordColourVariables 'wstring
#Attrib[1336].Colour = KeyWordColourVariables 'oem
#Attrib[1560].Colour = KeyWordColourVariables 'tstring
#Attrib[1264].Colour = KeyWordColourVariables 'iwstring
#Attrib[1263].Colour = KeyWordColourVariables 'itstring
#Attrib[1421].Colour = KeyWordColourVariables 'schar
#Attrib[1618].Colour = KeyWordColourVariables 'window
#Attrib[1002].Colour = KeyWordColourVariables 'dialog
#Attrib[1106].Colour = KeyWordColourVariables 'file
#Attrib[1314].Colour = KeyWordColourVariables 'memory
#Attrib[1364].Colour = KeyWordColourVariables 'pointer
#Attrib[920].Colour  = KeyWordColourVariables 'comref
#Attrib[955].Colour  = KeyWordColourVariables 'datablock
#Attrib[845].Colour  = KeyWordColourVariables 'anytype
#Attrib[1233].Colour = KeyWordColourVariables 'heap
#Attrib[1614].Colour = KeyWordColourVariables 'wheap

return
endsub

SUB SetupTiming(),INT
    SETPRECISION(TimePrecision)
    f = Freq: QueryPerformanceFrequency(f)
    x1 = StartCount: QueryPerformanceCounter(x1)
       FOR xy = 1 TO 1000
       NEXT xy
    x2 = StopCount: QueryPerformanceCounter(x2)
    OverHead = StopCount - StartCount
RETURN 0
ENDSUB

SUB ChangeWordEditorA(OPT INT id,STRING CheckWord,OPT INT StartPos,OPT INT EndPos),STRING
    IF !len(CheckWord) THEN RETURN CheckWord
    Letter  = UCASE$(MID$(CheckWord,1,1))
    Letter2 = UCASE$(MID$(CheckWord,2,1))
    IF INSTR("QXYZ",Letter) THEN RETURN CheckWord 'There are no keywords beginning with these letters.
    IF ASC(Letter) >= 48 AND ASC(Letter) <= 58
       RETURN CheckWord 'No keywords start with a number
    endif

    CheckWordLen = LEN(CheckWord)
    CheckWordLen2 = CheckWordLen - 1
    GetWord = 0
    Match = 0

    IF Letter <> "@"
       'Read keyword index.
       ThisRange = INSTR(KeyWordLetters,Letter)
       ToLoop = #pRange[1].Range[ThisRange,CheckWordLen,0]
       DoCase = 1
    ELSE
       'Read @ keyword index.
       ThisRange = INSTR(KeyWordLetters,Letter2)
       ToLoop = #pRangeAt[1].Range[ThisRange,CheckWordLen2,0]
       DoCase = 2
    ENDIF

    FOR WordLoop = 1 TO ToLoop
        SELECT DoCase
               CASE 1
                    'Get keyword index number.
                    GetWord = #pIndex[1].Entry[ThisRange,CheckWordLen,WordLoop]

               CASE 2
                    'Get @ keyword index number.
                    GetWord = #pIndexAt[1].Entry[ThisRange,CheckWordLen2,WordLoop]

        ENDSELECT

        lx$ = ""
        IF UCASE$(CheckWord) = #p[GetWord].Words
           Match = GetWord
           SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
           SENDMESSAGE id,EM_GETSELTEXT,0,&lx$
           IF Ucase <> 3
              IF Ucase = 1
                 lx$ = UCASE$(lx$)
                 SENDMESSAGE id,EM_REPLACESEL,TRUE,&lx$
              ELSE
                 lx$ = LCASE$(lx$)
                 SENDMESSAGE id,EM_REPLACESEL,TRUE,&lx$
              ENDIF
           ENDIF
           SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
           cf.dwMask = CFM_COLOR
           cf.crTextColor = #Attrib[GetWord].Colour
           cf.cbSize = SIZEOF(cf)
           SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)

           SELECT Ucase
                  CASE 3 'As typed
                       RETURN CheckWord
                  DEFAULT
                       RETURN lx$
           ENDSELECT
        ELSE
           'SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
           'cf.dwMask = CFM_COLOR
           'cf.crTextColor = RGB(0,0,0)
           'cf.cbSize = SIZEOF(cf)
           'SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
        ENDIF
        if Match 
           breakfor
        endif 
    NEXT WordLoop

'Non key word
RETURN CheckWord
ENDSUB

SUB GetWordsOnLine(INT id,INT LineNoIn,ISTRING LineToWords[1000000],INT Offset)
    LineLen = LEN(LineToWords)
    WordIn = ""
    WordCount = 0

    FOR b1 = 1 TO LineLen

        ThisPos = b1 + Offset
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter2,Letter)

        SELECT Del
               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter

               DEFAULT 'Delimiter found - so we have our word
                    IF LEN(WordIn)> 1 'Key words are at least 2 characrers long
                       StartPos = (ThisPos - LEN(WordIn))-1
                       EndPos   = ThisPos-1
                       WordCount ++
                       #w[WordCount].aWord = WordIn
                    ENDIF
                    WordIn = ""
         ENDSELECT
   NEXT b1

RETURN
ENDSUB

SUB GetCaseStatement(ISTRING LineToWords[512],opt int Switch)
    LineLen = LEN(LineToWords)
    WordIn = ""
    WordCount = 0

    #w[1].aWord = ""
    #w[2].aWord = ""

    FOR b1 = 1 TO LineLen
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter2,Letter)

        SELECT Del
               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter

               DEFAULT 'Delimiter found - so we have our word
                    IF LEN(WordIn)> 0 
                       WordCount ++
                       #w[WordCount].aWord = WordIn
                       if Switch and ucase$(ucase$(#w[1].aWord)) <> "CASE" then return
                       if Switch and ucase$(ucase$(#w[1].aWord)) =  "CASE" and WordCount = 2 then breakfor
                    ENDIF
                    WordIn = ""
         ENDSELECT
   NEXT b1

   if instr(#w[WordCount].aWord,chr$(13))
      #w[WordCount].aWord = mid$(#w[WordCount].aWord,1,instr(#w[WordCount].aWord,chr$(13)))
   endif

RETURN
ENDSUB

SUB GetWordsInBlockText(ISTRING LineToWords[1000000])
    LineLen = LEN(LineToWords)
    WordIn = ""
    WordCount = 0

    FOR b1 = 1 TO LineLen

        ThisPos = b1 + Offset
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter2,Letter)

        SELECT Del
               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter

               DEFAULT 'Delimiter found - so we have our word
                    IF LEN(WordIn)> 1 'Key words are at least 2 characrers long
                       StartPos = (ThisPos - LEN(WordIn))-1
                       EndPos   = ThisPos-1
                       WordCount ++
                       #w[WordCount].aWord = WordIn
                    ENDIF
                    WordIn = ""
         ENDSELECT
   NEXT b1

RETURN
ENDSUB

SUB GetAllWordsOnLine(INT id,INT LineNoIn,ISTRING LineToWords[1000000],INT Offset),INT
    LineLen = LEN(LineToWords)
    WordIn = ""
    TabCount = 0
    WordCount = 0
    INT WordNumber = 0
    INT WordMatch = 0
    FOR b1 = 1 TO LineLen

        ThisPos = b1 + Offset
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter4,Letter)

        SELECT Del
               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter

               case 40 'Tabs
                    TabCount ++ 
                    if WordIn <> "" then goto DoDefault 

               DEFAULT 'Delimiter found - so we have our word
                    label DoDefault
                    IF LEN(WordIn)> 0 'Key words are at least 2 characrers long
                       StartPos = (ThisPos - LEN(WordIn))-1
                       EndPos   = ThisPos-1
                       WordCount ++
                       #w[WordCount].aWord    = WordIn
                       #w[WordCount].StartPos = StartPos
                       #w[WordCount].EndPos   = EndPos
                       #w[WordCount].Length   = (EndPos - StartPos)
                    ENDIF
                    label NextWord
                    WordIn = ""
         ENDSELECT
   NEXT b1

   for b1 = 1 to WordCount
       if EditPos >= #w[b1].StartPos and EditPos <= #w[b1].EndPos
          WordMatch = 1
          breakfor
       endif
   next b1

   if WordMatch = 1
      return b1
   endif

return 0
endsub

SUB GetAllWordsOnLineKeyWord(INT id,INT LineNoIn,ISTRING LineToWords[1000000],INT Offset),INT
    LineLen = LEN(LineToWords)
    WordIn = ""
    WordCount = 0
    INT WordNumber = 0
    INT WordMatch = 0
    FOR b1 = 1 TO LineLen

        ThisPos = b1 + Offset
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter4,Letter)
        SELECT Del
               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter

               DEFAULT 'Delimiter found - so we have our word
                    IF LEN(WordIn)> 0 'Key words are at least 2 characrers long
                       StartPos = (ThisPos - LEN(WordIn))-1
                       EndPos   = ThisPos-1
                       WordCount ++
                       #m[WordCount].aWord    = WordIn
                       #m[WordCount].StartPos = StartPos
                       #m[WordCount].EndPos   = EndPos
                       #m[WordCount].Length   = (EndPos - StartPos)
                    ENDIF
                    WordIn = ""
         ENDSELECT
   NEXT b1

   for b1 = 1 to WordCount
       if EditPos >= #m[b1].StartPos and EditPos <= #m[b1].EndPos
          WordMatch = 1
          breakfor
       endif
   next b1

   if WordMatch = 1
      return b1
   endif

return 0
endsub

SUB MonitorLine(INT id,INT LineNoIn,ISTRING LineToWords[512],INT Offset)

    LineBeforeEnter = LineToWords

    LineLen = LEN(LineToWords)
    WordIn = ""
    TabCount = 0
    WordCount = 0

    FOR b1 = 1 TO LineLen

        ThisPos = b1 + Offset
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter2,Letter)

        IF Letter = CHR$(34) 'Quotes
			  DO
              b1 ++
              ThisPos = b1 + Offset
              Letter = LineToWords[b1-1]
           UNTIL Letter = CHR$(34) OR b1 >= LineLen
        ENDIF

        SELECT Del

               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter

               case 17 'Tab
                    TabCount ++

               DEFAULT 'Delimiter found - so we have our word
                     IF LEN(WordIn)> 1 'Key words are at least 2 characrers long
                        StartPos = (ThisPos - LEN(WordIn))-1
                        EndPos   = ThisPos-1
                        WordCount ++
                        #w[WordCount].aWord = WordIn
                     ENDIF
                     WordIn = ""
         ENDSELECT
   NEXT b1

   IF UCASE$(#w[1].aWord) = "SUB" AND WordCount = 2
      IF WordCount = 2 AND SubOpen = 0
         lvcount = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
         text2 = ""
         text4 = ""
         FOR a1 = 0 TO lvcount - 1
             CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,1,text2)
             IF VAL(text2) = LineNoIn + 1
                SubOpen = 2 'Sub routine already exists
                BREAKFOR
             ENDIF
         NEXT a1

         'Amend existing sub routine name
         IF SubOpen = 2
            lvcount = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
            FOR a1 = 0 TO lvcount - 1
                CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,1,text2)
                IF VAL(text2) = LineNoIn + 1
                   CONTROLCMD(w1,ListView2,@LVSETTEXT,a1,0,#w[2].aWord)
                   DELETESTRING w1,Combo2,a1
                   INSERTSTRING w1,Combo2,a1,#w[2].aWord
                   BREAKFOR
                ENDIF
            NEXT a1
         ENDIF

         'Add new sub routine?
         IF SubOpen = 0
            INT DupFound = 0
            lvcount = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
            FOR a1 = 0 TO lvcount - 1
                CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,0,text)
                IF RTRIM$(LTRIM$(text)) = #w[2].aWord
                   DupFound = 1
                   BREAKFOR
                ENDIF
            NEXT a1

            IF DupFound = 0
               INT NewInsertPos = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
               CONTROLCMD w1,ListView2,@LVINSERTITEM,NewInsertPos,#w[2].aWord
               INT position = CONTROLCMD(w1,ListView2,@LVFINDITEM,#w[2].aWord)

               print "New sub ###########   Line ",LineNoIn

               CONTROLCMD w1,ListView2,@LVSETTEXT,position,1,LTRIM$(STR$(LineNoIn+1))
               CONTROLCMD w1,ListView2,@LVSETTEXT,position,2,LTRIM$(STR$(LineNoIn+1))
               int lvcount2 = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
               string ComboJump = ""
               SendMessage(GetDlgItem(w1.hwnd,Combo2),CB_RESETCONTENT,0,0)
               int lvcount22 = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
               if lvcount22 > 0
                  StoreSubs()
                  PopulateSubRoutines()
               endif
            endif

            int LinesNow = CONTROLCMD(w1,1,@RTGETLINECOUNT)
            for a1 = LineNoIn to LinesNow
                CONTROLCMD(w1,1,@RTGETLINE,a1,line$,512)
                GetWordsOnLine(rHandle,a1,line$,0)
                if ucase$(#w[1].aWord) = "SUB"
                   EndSubOpen = 1
                   breakfor
                endif
                if ucase$(#w[1].aWord) = "ENDSUB"
                   CONTROLCMD w1,ListView2,@LVSETTEXT,position,2,LTRIM$(STR$(a1+1))
                   EndSubOpen = 0
                   BREAKFOR
                ENDIF
            NEXT a1
         ENDIF
      ENDIF
   ENDIF

   IF UCASE$(#w[1].aWord) = "ENDSUB" AND EndSubOpen = 1
      EndSubOpen = 0
      lvcount = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
      text2 = ""
      text4 = ""
      FOR a1 = 0 TO lvcount - 1
          CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,0,text)
          CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,1,text2)
          CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,2,text4)
          IF RTRIM$(LTRIM$(text2)) = RTRIM$(LTRIM$(text4))
             CONTROLCMD(w1,ListView2,@LVSETTEXT,a1,0,text)
             CONTROLCMD(w1,ListView2,@LVSETTEXT,a1,1,text2)
             CONTROLCMD(w1,ListView2,@LVSETTEXT,a1,2,LTRIM$(STR$(LineNoIn+1)))
             BREAKFOR
          ENDIF
      NEXT a1
   ENDIF

   DupFound = 0

   IF UCASE$(#w[1].aWord) = "OPENWINDOW" AND WordCount = 2
      IF WordCount = 2 AND WinOpen = 0
         lvcount = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
         text2 = ""
         text4 = ""
         FOR a1 = 0 TO lvcount - 1
             CONTROLCMD(w1,ListView4,@LVGETTEXT,a1,1,text2)
             IF VAL(text2) = LineNoIn + 1
                WinOpen = 2 'Window already exists
                BREAKFOR
             ENDIF
         NEXT a1

         'Amend existing eindow name
         IF WinOpen = 2
            lvcount = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
            FOR a1 = 0 TO lvcount - 1
                CONTROLCMD(w1,ListView4,@LVGETTEXT,a1,1,text2)
                IF VAL(text2) = LineNoIn + 1
                   CONTROLCMD(w1,ListView4,@LVSETTEXT,a1,0,#w[2].aWord)
                   DELETESTRING w1,Combo4,a1
                   INSERTSTRING w1,Combo4,a1,#w[2].aWord
                   BREAKFOR
                ENDIF
            NEXT a1
         ENDIF

         'Add new sub routine?
         IF WinOpen = 0
            DupFound = 0
            lvcount = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
            FOR a1 = 0 TO lvcount - 1
                CONTROLCMD(w1,ListView4,@LVGETTEXT,a1,0,text)
                IF RTRIM$(LTRIM$(text)) = #w[2].aWord
                   DupFound = 1
                   BREAKFOR
                ENDIF
            NEXT a1

            IF DupFound = 0
               NewInsertPos = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
               CONTROLCMD w1,ListView4,@LVINSERTITEM,NewInsertPos,#w[2].aWord
               position = CONTROLCMD(w1,ListView4,@LVFINDITEM,#w[2].aWord)
               CONTROLCMD w1,ListView4,@LVSETTEXT,position,1,LTRIM$(STR$(LineNoIn+1))
               CONTROLCMD w1,ListView4,@LVSETTEXT,position,2,LTRIM$(STR$(LineNoIn+1))
               lvcount2 = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
               ComboJump = ""
               SENDMESSAGE(GetDlgItem(w1.hwnd,Combo4),CB_RESETCONTENT,0,0)
               lvcount22 = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
               IF lvcount22 > 0
                  PopulateWindows()
               ENDIF
            ENDIF

            LinesNow = CONTROLCMD(w1,1,@RTGETLINECOUNT)
            FOR a1 = LineNoIn TO LinesNow
                CONTROLCMD(w1,1,@RTGETLINE,a1,line$,512)
                GetWordsOnLine(rHandle,a1,line$,0)
                IF UCASE$(#w[1].aWord) = "OPENWINDOW"
                   EndWinOpen = 1
                   BREAKFOR
                ENDIF
                IF UCASE$(#w[1].aWord) = "WAITUNTIL"
                   CONTROLCMD w1,ListView4,@LVSETTEXT,position,2,LTRIM$(STR$(a1+1))
                   EndWinOpen = 0
                   breakfor
                endif
            next a1
         ENDIF
      ENDIF
   ENDIF

   IF UCASE$(#w[1].aWord) = "WAITUNTIL" AND EndWinOpen = 1
      EndSubOpen = 0
      lvcount = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
      text2 = ""
      text4 = ""
      FOR a1 = 0 TO lvcount - 1
          CONTROLCMD(w1,ListView4,@LVGETTEXT,a1,0,text)
          CONTROLCMD(w1,ListView4,@LVGETTEXT,a1,1,text2)
          CONTROLCMD(w1,ListView4,@LVGETTEXT,a1,2,text4)
          IF RTRIM$(LTRIM$(text2)) = RTRIM$(LTRIM$(text4))
             CONTROLCMD(w1,ListView4,@LVSETTEXT,a1,0,text)
             CONTROLCMD(w1,ListView4,@LVSETTEXT,a1,1,text2)
             CONTROLCMD(w1,ListView4,@LVSETTEXT,a1,2,LTRIM$(STR$(LineNoIn+1)))
             BREAKFOR
          ENDIF
      NEXT a1
   ENDIF

RETURN
ENDSUB

SUB StoreSubs()
    INT a1 = 0
    FOR a1 = 1 TO 500000
       Subs[a1]= 0
    NEXT a1
    INT lvcount = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
    SubCount = lvcount
    for a1 = 0 to lvcount
       CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,1,text)
       int SubVal = val(Text)-1
       Subs[SubVal]= SubVal
    next a1
endsub

sub PopulateSubRoutines()
    int lvcount = CONTROLCMD(w1,ListView2,@LVGETCOUNT)
    int a1 = 0
    for a1 = 0 to lvcount -1
        CONTROLCMD(w1,ListView2,@LVGETTEXT,a1,0,text)
        ADDSTRING w1,Combo2,text
    next a1
RETURN
ENDSUB

SUB PopulateWindows()
    INT lvcount = CONTROLCMD(w1,ListView4,@LVGETCOUNT)
    INT a1 = 0
    FOR a1 = 0 TO lvcount - 1
        CONTROLCMD(w1,ListView4,@LVGETTEXT,a1,0,text)
        ADDSTRING w1,Combo4,text
    NEXT a1
RETURN
ENDSUB

SUB MonitorBrackets(INT id,INT LineNoIn,ISTRING LineToWords[512],INT Offset)
    LineLen = LEN(LineToWords)
    OpenRound = 0
    CloseRound = 0
    OpenSquare = 0
    closeSquare = 0

    FOR b1 = 1 TO LineLen

        ThisPos = b1 + Offset
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter2,Letter)

        IF Letter = CHR$(34) 'Quotes
			  DO
              b1 ++
              ThisPos = b1 + Offset
              Letter = LineToWords[b1-1]
           UNTIL Letter = CHR$(34) OR b1 >= LineLen
        endif

        SELECT Del
               CASE 7 ' (
                    OpenRound ++

               case 8 ')
                    CloseRound ++

               CASE 9 ' [
                    OpenSquare ++

               case 10 ']
                    CloseSquare ++
         ENDSELECT
   NEXT b1
return
endsub

'===================================
' Routine to colour a line of text '
'===================================

SUB ColourLineP(INT id,INT LineNoIn,INT Offset,Opt int Switch)

    WordCountP = 0
    CheckLocalSubs = 0
    CheckLocalWindows = 1
    LineLen = LEN(#cp.ClipText)
    WordIn = ""

    'Colour the whole line with one colour first
    SENDMESSAGE(id,EM_SETSEL,Offset,LineLen + Offset)
    cf.dwMask = CFM_COLOR
    cf.crTextColor = TextColour
    cf.cbSize = SIZEOF(cf)
    SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)

    int HexPos = 0
    if instr(ucase$(#cp.ClipText),"0X")
       HexPos = (instr(ucase$(#cp.ClipText),"0X") + Offset) - 1
    endif

    'Get every character and build up individual words
    FOR b1 = 1 TO LineLen
        ThisPos = b1 + Offset
        Letter  = #cp.ClipText[b1-1]

        if HexPos 'and Loading = 1
			  if HexPos and (b1 + Offset) = HexPos
				  int HexLen = 0
				  DO
					  b1 ++
					  Letter = #cp.ClipText[b1-1]
					  Del = INSTR(CheckLetter2,Letter)
					  if !Del 
						  HexLen ++
					  endif
				  UNTIL Del OR b1 = LineLen
				  SENDMESSAGE(id,EM_SETSEL,HexPos,HexPos + HexLen)
				  cf.dwMask = CFM_COLOR
				  cf.crTextColor = HexColour
				  cf.cbSize = SIZEOF(cf)
				  SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
			  endif
        endif

        'Is the character a delimeter? i.e. is Del > 0, if so then a delimeter has been found 
        Del = INSTR(CheckLetter2,Letter)

        'No delimeter found, is the character a number?
        if !Del
            Num = INSTR(CheckNumber,Letter)
            if Num 'Number found - colour it
               SENDMESSAGE(id,EM_SETSEL,ThisPos-1,ThisPos)
				   cf.dwMask = CFM_COLOR
				   cf.crTextColor = ColourNumbers
				   cf.cbSize = SIZEOF(cf)
				   SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
            endif
         endif 

         SELECT Del

                CASE 0 'No delimeter found so add character to our word string
                     WordIn = WordIn + Letter
                     StartPos = b1 + (Offset-1)
                     EndPos = StartPos + 1

                CASE 1 'Quotes found - move on until we find the closing " symbol
                     if instr(#cp.ClipText,chr$(34))
								WordIn = ""
								StartPos = b1 + (Offset-1)
								DO
									b1 ++
									Letter = #cp.ClipText[b1-1]
								UNTIL Letter = CHR$(34) OR b1 = LineLen

								EndPos = b1 + Offset

                        'Colour the whole range that the quotes span including every thing inside 
								SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
								cf.dwMask = CFM_COLOR
								cf.crTextColor = QuotesColour
								cf.cbSize = SIZEOF(cf)
								SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
								IF b1 = LineLen THEN RETURN
                     endif

                CASE 2 'Comment symbol found, colour the rest of the line accordingly
                     if instr(#cp.ClipText,"'")
								WordIn = ""
								StartPos = b1 + (Offset-1)
								SENDMESSAGE(id,EM_SETSEL,StartPos,LineLen + Offset)
								cf.dwMask = CFM_COLOR
								cf.crTextColor = CommentColour
								cf.cbSize = SIZEOF(cf)
								SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
								RETURN
                     endif

                CASE  7 'Opening round bracket found - ( - Make a note to check if word is a local sub routine?
                      CheckLocalSubs = 1
                      
                CASE& 8 'Closing round bracket found - )
                     StartPos = b1 + (Offset-1)
                     SENDMESSAGE(id,EM_SETSEL,StartPos,StartPos+1)
                     cf.dwMask = CFM_COLOR
                     cf.crTextColor = RoundBrackets
                     cf.cbSize = SIZEOF(cf)
                     SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
                     GOTO DoDefault

                CASE  9  'Opening square bracket found - [
                CASE& 10 'Closing square bracket found - ]
                     StartPos = b1 + (Offset-1)
                     SENDMESSAGE(id,EM_SETSEL,StartPos,StartPos+1)
                     cf.dwMask = CFM_COLOR
                     cf.crTextColor = SquareBrackets
                     cf.cbSize = SIZEOF(cf)
                     SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
                     GOTO DoDefault

                CASE 16 'Separator found - | - Colour accordingly
                     StartPos = b1 + (Offset-1)
                     SENDMESSAGE(id,EM_SETSEL,StartPos,StartPos+1)
                     cf.dwMask = CFM_COLOR '| CFM_BOLD
                     'cf.dwEffects = CFM_BOLD
                     cf.crTextColor = SquareBrackets
                     cf.cbSize = SIZEOF(cf)
                     SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
                     GOTO DoDefault

                CASE 18 'Last word on the line - Remove any carriage return character from the last word on line
                     WordIn = MID$(WordIn,1,INSTR(WordIn,CHR$(13))-1)
                     'StartPos = (ThisPos - LEN(WordIn))-1
                     'EndPos   = ThisPos-1

                     IF LEN(WordIn)> 1  'Key words are at least 2 characrers long

                        'Check word to see if it is a key word, if so colour accordingly
                        'Variable "Match" will have a value is a key word was matched
                        WordIn = ChangeWordEditorA(id,WordIn,(ThisPos - LEN(WordIn))-1,(ThisPos)-1)

                        'Is the word a local sub routine?
								if CheckLocalSubs and !Match 'We came across an opening round bracket and the word was not a key word
									PositionZ = CONTROLCMD(w1,ListView2,@LVFINDITEM,WordIn)
                           'Local sub routine found, colour accordingly
									if PositionZ > -1
										SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
										cf.dwMask = CFM_COLOR 
										cf.crTextColor = LocalSubColour
										cf.cbSize = SIZEOF(cf)
										SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
									endif
									CheckLocalSubs = 0
								endif
								if !Match 
                           'Is the word a local window name? 
									PositionZ = CONTROLCMD(w1,ListView4,@LVFINDITEM,WordIn)
                           'Local window found, colour accordingly
									if PositionZ > -1
                              EndPos = StartPos + 1
                              StartPOs = (StartPos - len(WordIn))+1
										SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
										cf.dwMask = CFM_COLOR 
										cf.crTextColor = LocalWinColour
										cf.cbSize = SIZEOF(cf)
										SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
									endif
								endif

								if !Match 
                           'Is the word a case name? 
									PositionZ = CONTROLCMD(w1,ListView10,@LVFINDITEM,WordIn)
                           'Local case found, colour accordingly
									if PositionZ > -1
                              EndPos = StartPos + 1
                              StartPos = (StartPos - len(WordIn))+1
										SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
										cf.dwMask = CFM_COLOR 
										cf.crTextColor = LocalCaseColour
										cf.cbSize = SIZEOF(cf)
										SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
									endif
								endif

                     ENDIF
                     RETURN

                DEFAULT 'Other delimiter - so we have a word which is not the last word on the line
                     LABEL DoDefault
                     IF CommentBlockStart AND CommentBlockEnd = 0 THEN GOTO NextWord
                     IF LEN(WordIn)> 1 'Key words are at least 2 characrers long
                        StartPos = (ThisPos - LEN(WordIn))-1
                        EndPos   = ThisPos-1

                        'Check word to see if it is a key word, if so colour accordingly
                        'Variable "Match" will have a value is a key word was matched
                        WordIn = ChangeWordEditorA(id,WordIn,StartPos,EndPos)

								if CheckLocalSubs and !Match 'We came across an opening round bracket and the word was not a key word 
                           'Is the word a local sub routine name?
									PositionZ = CONTROLCMD(w1,ListView2,@LVFINDITEM,WordIn)
                           'Local sub routine found, colour accordingly
									if PositionZ > -1
										SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
										cf.dwMask = CFM_COLOR 
										cf.crTextColor = LocalSubColour
										cf.cbSize = SIZEOF(cf)
										SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
                              CheckLocalSubs = 0
									endif
									CheckLocalSubs = 0
								endif
								if !Match 
                           'Is the word a local window name?
									PositionZ = CONTROLCMD(w1,ListView4,@LVFINDITEM,WordIn)
                           'Local window found, colour accordingly
									if PositionZ > -1
										SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
										cf.dwMask = CFM_COLOR 
										cf.crTextColor = LocalWinColour
										cf.cbSize = SIZEOF(cf)
										SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
									endif
								endif

								if !Match 
                           'Is the word a case name? 
									PositionZ = CONTROLCMD(w1,ListView10,@LVFINDITEM,WordIn)
                           'Local case found, colour accordingly
									if PositionZ > -1
                              'EndPos = StartPos + 1
                              'StartPos = (StartPos - len(WordIn))+1
										SENDMESSAGE(id,EM_SETSEL,StartPos,EndPos)
										cf.dwMask = CFM_COLOR 
										cf.crTextColor = LocalCaseColour
										cf.cbSize = SIZEOF(cf)
										SENDMESSAGE(id,EM_SETCHARFORMAT,SCF_SELECTION,&cf)
									endif
								endif

                     ENDIF
                     'Let's carry on now and build up the next word
                     LABEL NextWord
                     WordIn = ""
         ENDSELECT
    NEXT b1

'End of line - finished.
RETURN
ENDSUB

'==================================
'                                 '
' A Super fast wat to load a file '
'         Thanks Clint!           '
'                                 '
'================================== 
sub LoadFileToString(string path, string buffer, uint cchBuffer, pointer pFileSize),int
	' path = filename to load
	' buffer = ISTRING variable to store file in
	' cchBuffer = size of buffer
	' pFileSize = pointer to variable to store file size

	int BytesRead, success = false
	bfile f

	if (cchBuffer and !OPENFILE(f,path,"R"))
		'declare required imports
		'declare import,GetBFileSize alias GetFileSize(bfile hFile,pointer lpFileSizeHigh),uint
		'declare import,ReadBFile alias ReadFile(bfile hFile,pointer lpBuffer,_
		'     int nNumberOfBytesToRead,pointer lpNumberOfBytesRead,pointer lpOverlapped),int

		uint filesizeHigh
		uint filesizeLow = GetFileSize(f, &filesizeHigh)
		if (filesizeHigh)
			'TODO: file size is >=4GB, *pFileSize should be uint64
			filesizeLow = 0xFFFFFFFF
		endif
		*<uint>pFileSize = filesizeLow

		uint BytesToRead = cchBuffer-1 ' make room for terminating NULL
		if (ReadFile(f, buffer, BytesToRead, &BytesRead, 0))
			buffer[BytesRead] = 0
			success = true
		endif
		closefile f
	endif
	return success
endsub

sub LoadFonts(win:window,cid:int,justtruetype:int)
    def hdc:int
    want.lfCharset=DEFAULT_CHARSET
    want.lfFaceName=""
    want.lfPitchAndFamily=0
    want.lfWidth=0
    want.lfHeight=0
    lastff=""
    lwin=win
    lcid=cid
    hdc=Gethdc(win)
    EnumFontFamiliesExA(hdc,want,&mySub,justtruetype,0)
    releasehdc win,hdc
    return
endsub

sub MySub(Mylf:logfont,lpntme:pointer,FontType:uint,lParam:int)
   if lParam
      if (FontType&TRUETYPE_FONTTYPE)=0
         return 1
      endif
   endif

   if Mylf.lfFaceName <> lastff
      lastDiff = Mylf.lfFaceName
		int PositionZ = CONTROLCMD(lwin,lcid,@LVFINDITEM,Mylf.lfFaceName)
		if PositionZ = -1
			InsertPosAt ++
			CONTROLCMD lwin,lcid,@LVINSERTITEM,InsertPosAt,Mylf.lfFaceName 
		endif

      int a
      string text
	   int lvcount2 = CONTROLCMD(lwin,lcid,@LVGETCOUNT)
	   for a = 0 to lvcount2
		    CONTROLCMD(lwin,lcid,@LVGETTEXT,a,0,text)
		    if text = Mylf.lfFaceName
			    CONTROLCMD(lwin,lcid,@LVSETTEXT,a,1,ltrim$(str$(Mylf.lfWidth)))
			    CONTROLCMD(lwin,lcid,@LVSETTEXT,a,2,ltrim$(str$(Mylf.lfHeight)))
			    breakfor
		    endif
	   next a 
   endif
return 1
endsub

SUB GetAllWordsToSearch(ISTRING LineToWords[1000000]),INT
    LineLen = LEN(LineToWords)
    WordIn = ""
    WordCountS = 0
    DelCountS  = 0
    INT WordNumber = 0
    INT WordMatch = 0
    Scount = 0

    for b1 = 1 to 100
        #s[b1].aWord = ""
        #s[b1].Matched = 0
        #et[b1].Del = ""
        #et[b1].Matched = 0
        Sequence[b1] = ""
    next b1
 
    FOR b1 = 1 TO LineLen
        Letter = mid$(LineToWords,b1,1)
        if Letter = " " then goto DoWord
        Del = INSTR(CheckLetter2,Letter)
        if b1 = LineLen 
           WordIn = WordIn + Letter
           if Del = 0 then goto DoWord
           if Del then goto DoDefault
        endif
        SELECT Del
               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter

               DEFAULT 'Delimiter found - so we have our word
                    label DoWord
                    if instr(WordIn,chr$(13))
                       WordIn = mid$(WordIn,1,instr(WordIn,chr$(13))-1) 
                    endif
                    IF LEN(WordIn) 'and WordIn <> Letter
                       WordCountS ++
                       #s[WordCountS].aWord = ltrim$(rtrim$(WordIn))
                       Scount ++
                       Sequence[Scount] = #s[WordCountS].aWord
                    ENDIF
                    label DoDefault
                    if b1 <> LineLen 
							  DelCountS ++
							  #et[DelCountS].Del = Letter
							  Scount ++
							  Sequence[Scount] = #et[DelCountS].Del
                    endif 
                    label NextWord
                    WordIn = ""
         ENDSELECT
   NEXT b1

return 0
endsub

SUB GetWordsFromLine(INT LineNoIn,ISTRING LineToWords[512]),int
    AllMatched = 0
    LineBeforeEnter = LineToWords
    LineLen = LEN(LineToWords)
    WordIn = ""
    TabCount = 0
    WordCount = 0

    for b1 = 1 to 50
        #s[b1].Matched = 0
    next b1

    FOR b1 = 1 TO LineLen

        ThisPos = b1 + Offset
        Letter = LineToWords[b1-1]
        Del = INSTR(CheckLetter2,Letter)

        if Letter = "'" then return 0
        IF Letter = CHR$(34) 'Quotes
			  DO
              b1 ++
              ThisPos = b1 + Offset
              Letter = LineToWords[b1-1]
           UNTIL Letter = CHR$(34) OR b1 >= LineLen
        ENDIF

        SELECT Del
               CASE 0 'Add character to our word
                    WordIn = WordIn + Letter
               case 17 'Tab
                    TabCount ++
               case 18
                    if instr(WordIn,chr$(13))
                       WordIn = MID$(WordIn,1,INSTR(WordIn,CHR$(13))-1)
                    endif
                    goto DoDefault 

               DEFAULT 'Delimiter found - so we have our word
                    label DoDefault
                    if instr(WordIn,chr$(13))
                       WordIn = MID$(WordIn,1,INSTR(WordIn,CHR$(13))-1)
                    endif
                    IF LEN(WordIn)> 1 'Key words are at least 2 characrers long
                       StartPos = (ThisPos - LEN(WordIn))-1
                       EndPos   = ThisPos-1
                       WordCount ++
                       #w[WordCount].aWord = WordIn
                    ENDIF
                    WordIn = ""
         ENDSELECT
   NEXT b1

	if WordCount > 0 and AndV = 1 or OrV = 1
		for b1 = 1 to WordCount
			 'Sub routine details
			 if b1 = 1 and ucase$(#w[b1].aWord) = "SUB"
				 SubOpen = LineNoIn
			 endif
			 if b1 = 1 and ucase$(#w[b1].aWord) = "ENDSUB"
				 SubOpen = -1
				 CurrentSub = ""
			 endif
			 if SubOpen = LineNoIn 
				 CurrentSub = #w[2].aWord
			 endif
			 'Window details
			 if b1 = 1 and ucase$(#w[b1].aWord) = "OPENWINDOW"
				 WinOpen = LineNoIn
			 endif
			 if b1 = 1 and ucase$(#w[b1].aWord) = "WAITUNTIL"
				 WinOpen = -1
				 CurrentSub = ""
			 endif
			 if WinOpen = LineNoIn 
				 CurrentSub = #w[2].aWord
			 endif
		next b1
	endif

	int b2 = 0
	for b1 = 1 To WordCount
		 for b2 = 1 to WordCountS  
			  if ucase$(#w[b1].aWord) = ucase$(#s[b2].aWord) and #s[b2].Matched <> 1
				  AllMatched ++
				  #s[b2].Matched = 1
			  endif
		  next b2
	next b1
return 0
endsub

