Home » Archimedes archive » Archimedes World » AW-1993-02.adf » AWFeb93 » !AWFeb93/Goodies/Wordsearch/!Word/!RunImage
!AWFeb93/Goodies/Wordsearch/!Word/!RunImage
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1993-02.adf » AWFeb93 |
Filename: | !AWFeb93/Goodies/Wordsearch/!Word/!RunImage |
Read OK: | ✔ |
File size: | 9254 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >!RunImage 20REM !WordSearch 30REM LEN1992 Archimedes World 40REM by Andrew Ellam 50REM Shell for writing Wimp applications was written by Jason O'Broin. 60REM It was published in (and is probably still LEN) BBC Acorn User. 70REM Interface Manager II module is LEN1991 SoftWare Interrupt Developments 80 90REM Apologies for silly icons inside main directory (they're resources 100REM you see!). 110 120REM First half is (mainly) wimp interface - second is main code 130 140handle% = -1 150ON ERROR PROCerror 160 170SYS "Hourglass_On" 180PROCsetup 190PROCcheckforload 200SYS "Hourglass_Off" 210dummy$ = FNaction(FALSE) 220PROCfinishwimp 230END 240 250DEF PROCsetup 260PROCinit 270alias$="<Word$Dir>" 280version$="2.52 (12-Nov-92)" 290DIM q% 100, block% 1000, newblock% 1000, menblk% 1000, okblock% 200 300DIM main_blk% 1000, back_blk% 1000 310DIM words_sub% 1000, output_sub% 1000, gaps_sub% 1000 320DIM text% 100, stateblock% 1000 330$q%="TASK" 340SYS "Wimp_Initialise",200,!q%,"Wordsearch" TO ,handle% 350SYS "Wimp_ClaimInterface",handle% 360PROCsprites("<Word$Dir>.!Sprites") 370iconh%=FNiconbar("!Wordicon") 380info%=FNtemplates("<Word$Dir>.Templates") 390PROCset_version(info%,3,version$) 400PROCload_menus 410PROCprebuildmenus 420quit%=FALSE 430PROCresetmask 440mytype% = &040 450mytype$ = "Wordsrch" 460mytypeinhex$ = "&040" 470dashes% = 1 480ENDPROC 490 500DEF PROCresetmask 510REM 0,1,2,3,4,6,7,8,9,17,18 520mask%=%10011111110000100000 530ENDPROC 540 550DEF PROCprebuildmenus 560men1y%=0:PROCbuild_menu("Wordsearch",men1y%) 570men1height%=men1y% 580men2y%=0:PROCbuild_menu(" Wordsearch ",men2y%) 590men2height%=men2y% 600men3y%=0:PROCbuild_menu(" Wordsearch ",men3y%) 610men3height%=men3y% 620ENDPROC 630 640DEF PROCload_menus 650lm%=OPENIN("<Word$Dir>.Menu") 660dim%=EXT#lm% 670CLOSE#lm% 680DIM menu_data% dim% 690OSCLI "LOAD "+"<Word$Dir>.Menu "+STR$~(menu_data%) 700current_menu$="" 710ENDPROC 720 730DEF FNiconbar(spname$) 740!block%=-1 750block%!4=0 760block%!8=0 770block%!12=70 780block%!16=70 790REM block%!20=&2102 800block%!20=&13182 810DIM block%!24 (LENspname$+1) 820$(block%!24)=spname$ 830block%!28=sprite% 840block%!32=(LENspname$+1) 850SYS "Wimp_CreateIcon",,block% TO icon% 860=icon% 870 880DEF PROCsprites(file$) 890sp=OPENIN(file$) 900dim%=EXT#sp+16 910CLOSE#sp 920DIM sprite% dim% 930!sprite%=dim% 940sprite%!4=0 950sprite%!8=16 960sprite%!12=16 970SYS "OS_SpriteOp",256+10,sprite%,file$ 980ENDPROC 990 1000DEF PROCcheckforload 1010LOCAL filename$ 1020SYS "OS_GetEnv" TO filename$ 1030filename$ = MID$(filename$,INSTR(filename$,"RunImage")+10) 1040IF LEN(filename$) > 0 THEN 1050PROCloadgrid(filename$) 1060PROCset_version(save%,1,filename$) 1070PROCopengrid 1080ENDIF 1090ENDPROC 1100 1110DEF FNaction(processwindow%) 1120LOCAL result$,newresult$ 1130REPEAT 1140!block%=mask% 1150SYS "Wimp_Poll",mask%,block% TO reason% 1160SYS "Wimp_PollPointer",reason%,,handle% 1170CASE reason% OF 1180WHEN 0 : IF NOT (processwindow% = FALSE) AND result$ <> "Pause" THEN PROCimstillalive 1190WHEN 1 : PROCreopen 1200WHEN 2 : PROCopen 1210WHEN 3 : PROCclose 1220WHEN 6 1230IF processwindow%=FALSE THEN PROCcheck_mouse(!block%,block%!4,block%!8,block%!12,block%!16) ELSE newresult$ = FNsecondaryclick(processwindow%,block%!12,block%!16,block%!8,!block%,block%!4) 1240IF NOT (result$ = "Pause" AND newresult$ = "") THEN result$ = newresult$ 1250WHEN 7 : IF processwindow%=FALSE THEN PROCfinishdrag 1260WHEN 8 : IF processwindow%=FALSE THEN PROCkeypressed(block%!24,!block%,block%!4) ELSE PROCpassonkey 1270WHEN 9 : PROCmenu_select 1280WHEN 17,18 : PROCwimpmessage(processwindow%) 1290ENDCASE 1300UNTIL quit% OR ( processwindow% AND result$ <> "Pause" ) 1310=result$ 1320 1330DEF PROCimstillalive 1340IF LEN(FNtextfromwritable(fitting%,2)) = 25 THEN dashes% = -1 ELSE IF LEN(FNtextfromwritable(fitting%,2)) = 0 THEN dashes% = 1 1350IF dashes% = 1 THEN PROCset_version(fitting%,2,FNtextfromwritable(fitting%,2)+"-") ELSE PROCset_version(fitting%,2,LEFT$(FNtextfromwritable(fitting%,2),LEN(FNtextfromwritable(fitting%,2))-1)) 1360ENDPROC 1370 1380DEF PROCpassonkey 1390SYS "Wimp_ProcessKey",block%!24 1400ENDPROC 1410 1420DEF PROCkeypressed(key%,winhnd%,iconhnd%) 1430CASE key% OF 1440WHEN &0D : PROCreturn(winhnd%,iconhnd%) 1450WHEN &18F : PROCuparrow(winhnd%,iconhnd%) 1460WHEN &18E : PROCdownarrow(winhnd%,iconhnd%) 1470OTHERWISE PROCpassonkey 1480ENDCASE 1490ENDPROC 1500 1510DEF PROCreturn(winhnd%,iconhnd%) 1520CASE winhnd% OF 1530WHEN newgrid% 1540IF iconhnd% = 3 THEN 1550PROCchecknewgrid 1560PROCcloseonclick(newgrid%) 1570ELSE IF iconhnd% = 2 THEN PROCdownarrow(newgrid%,2) 1580ENDIF 1590WHEN newword% : PROCcallnewword 1600WHEN save% 1610IF INSTR(FNtextfromwritable(save%,1),":") > 0 THEN 1620PROCsavegrid(FNtextfromwritable(save%,1)) 1630PROCcloseonclick(save%) 1640ELSE 1650PROCprotestatname 1660ENDIF 1670WHEN savetext% 1680IF INSTR(FNtextfromwritable(savetext%,1),":") > 0 THEN 1690PROCsaveastext(FNtextfromwritable(savetext%,1)) 1700PROCcloseonclick(savetext%) 1710ELSE 1720PROCprotestatname 1730ENDIF 1740WHEN remove% 1750PROCremove(FNtextfromwritable(remove%,0)) 1760ENDCASE 1770ENDPROC 1780 1790DEF PROCclearremoveicon 1800PROCset_version(remove%,0,"") 1810PROCsetcaret(remove%,0) 1820ENDPROC 1830 1840DEF PROCuparrow(winhnd%,iconhnd%) 1850IF winhnd% = newgrid% AND iconhnd% = 3 THEN PROCsetcaret(newgrid%,2) 1860ENDPROC 1870 1880DEF PROCdownarrow(winhnd%,iconhnd%) 1890IF winhnd% = newgrid% AND iconhnd% = 2 THEN PROCsetcaret(newgrid%,3) 1900ENDPROC 1910 1920DEF PROCsetcaret(winhnd%,iconhnd%) 1930SYS "Wimp_SetCaretPosition",winhnd%,iconhnd%,,,-1,LEN(FNtextfromwritable(winhnd%,iconhnd%)) 1940ENDPROC 1950 1960DEF PROCfinishdrag 1970REM Icon has been dropped 1980REM x0,y4,but8,win12,icon16 1990SYS "Wimp_GetPointerInfo",,newblock% 2000newblock%!20=newblock%!12 : REM Window handle 2010newblock%!24=newblock%!16 : REM icon handle 2020newblock%!28=!newblock% : REM x 2030newblock%!32=newblock%!4 : REM y 2040!newblock%=256 2050newblock%!12=0 2060newblock%!16=1 : REM Message_DataSave 2070newblock%!36=750 : REM Size of file 2080IF drag$ = "norm" THEN 2090newblock%!40=mytype% 2100$(newblock%+44)=FNleafname(FNtextfromwritable(save%,1)) 2110ELSE 2120newblock%!40=&FFF 2130$(newblock%+44)=FNleafname(FNtextfromwritable(savetext%,1)) 2140ENDIF 2150?(newblock%+44+LEN$(newblock%+44))=0 2160SYS "Wimp_SendMessage",17,newblock% 2170saveref% = newblock%!8 2180ENDPROC 2190 2200DEF FNleafname(pathname$) 2210LOCAL beginning%,letter% 2220letter% = LEN(pathname$) 2230WHILE MID$(pathname$,letter%,1) <> "." AND letter% > 0 2240letter% -= 1 2250ENDWHILE 2260=MID$(pathname$,letter%+1) 2270 2280DEF PROCwimpmessage(processwindow%) 2290CASE block%!16 OF 2300WHEN 0 : REM Message_Quit 2310quit% = TRUE 2320WHEN 2 : REM Message_DataSaveAck 2330IF processwindow%=FALSE THEN 2340IF drag$ = "norm" THEN PROCsavefromwimp ELSE PROCsaveastextfromwimp 2350ENDIF 2360WHEN 3 : REM Message_DataLoad 2370IF NOT processwindow% THEN PROCloadfromwimp 2380WHEN 5 : REM Message_DataOpen 2390IF NOT processwindow% AND block%!40 = mytype% THEN PROCloadfromwimp 2400WHEN 8 : REM Message_PreQuit 2410IF griddefined% = TRUE AND saved% = FALSE THEN PROCobject 2420WHEN &502 : REM Help message request 2430SYS "Wimp_SendInformation",,block% 2440ENDCASE 2450ENDPROC 2460 2470DEF PROCobject 2480IF FNraiseobjection = FALSE THEN 2490block%!12 = block%!8 2500SYS "Wimp_SendMessage",19,block%,0 2510ENDIF 2520ENDPROC 2530 2540DEF FNraiseobjection 2550=FNyorn("1 file edited but not saved in Wordsearch Creator. Are you sure you want to Quit?") 2560 2570DEF PROCsavefromwimp 2580IF block%!12 <> saveref% OR block%!36 = -1 THEN ENDPROC 2590PROCsavegrid(FNfindname(block%+44)) 2600PROCset_version(save%,1,FNfindname(block%+44)) 2610ENDPROC 2620 2630DEF PROCsaveastextfromwimp 2640IF block%!12 <> saveref% OR block%!36 = -1 THEN ENDPROC 2650PROCsaveastext(FNfindname(block%+44)) 2660PROCset_version(savetext%,1,FNfindname(block%+44)) 2670ENDPROC 2680 2690DEF PROCloadfromwimp 2700IF block%!40 <> mytype% THEN PROCok("I can only load "+mytype$+" files (filetype "+mytypeinhex$+")") : ENDPROC 2710LOCAL condition% 2720condition% = FALSE 2730!block% = 256 2740block%!12 = block%!8 2750block%!16 = 4 2760SYS "Wimp_SendMessage",17,block%,block%!4 : REM Send Message_DataLoadAck 2770IF griddefined% AND changed% = TRUE THEN IF FNyorn("This will delete the grid you have already made. Click OK to load the new grid instead or Cancel to keep the old one.") THEN condition% = TRUE 2780IF griddefined% AND changed% = FALSE THEN condition% = TRUE 2790IF NOT griddefined% THEN condition% = TRUE 2800IF condition% = TRUE THEN 2810 PROCloadgrid(FNfindname(block%+44)) 2820 PROCset_version(save%,1,FNfindname(block%+44)) 2830PROCopengrid 2840ENDIF 2850ENDPROC 2860 2870DEF PROCreopen 2880SYS "Wimp_RedrawWindow",,block% TO flag% 2890WHILE flag% 2900SYS "Wimp_BorderWindow",,block% 2910SYS "Wimp_GetRectangle",,block% TO flag% 2920ENDWHILE 2930ENDPROC 2940 2950DEF PROCcheck_mouse(mx%,my%,but%,hnd%,iconhnd%) 2960IF hnd% = info% THEN ENDPROC 2970CASE but% OF 2980WHEN %001 2990PROCslabinicons 3000CASE hnd% OF 3010WHEN newword% : PROCnewwordclick(iconhnd%) 3020WHEN newgrid% : PROCnewgridclick(iconhnd%,but%) 3030WHEN options% : PROCoptionsclick(iconhnd%,but%) 3040WHEN save% : PROCsaveclick(iconhnd%,but%) 3050WHEN savetext% : PROCsavetextclick(iconhnd%,but%) 3060WHEN remove% : PROCremoveclick(iconhnd%,but%) 3070ENDCASE 3080PROCslabouticons 3090WHEN %010 3100IF hnd%=-2 THEN 3110menux%=mx%-64 3120menuy% = men1y% 3130menheight% = men1height% 3140PROCre_openmenu("Wordsearch",menux%,menheight%) 3150ELSE 3160IF hnd% <> options% AND hnd% <> newgrid% AND hnd% <> save% AND hnd% <> savetext% AND hnd% <> stats% THEN 3170menux% = mx%-64 3180menuy% = men2y% 3190PROCre_openmenu(" Wordsearch ",menux%,my%) 3200ENDIF 3210REM Spaces in line above are VERY important 3220ENDIF 3230WHEN %100 3240PROCslabinicons 3250CASE hnd% OF 3260WHEN -2 : PROCiconbarclick 3270WHEN newword% : PROCnewwordclick(iconhnd%) 3280WHEN newgrid% : PROCnewgridclick(iconhnd%,but%) 3290WHEN options% : PROCoptionsclick(iconhnd%,but%) 3300WHEN save% : PROCsaveclick(iconhnd%,but%) 3310WHEN savetext% : PROCsavetextclick(iconhnd%,but%) 3320WHEN remove% : PROCremoveclick(iconhnd%,but%) 3330ENDCASE 3340PROCslabouticons 3350WHEN &40 : REM drag 3360CASE hnd% OF 3370WHEN save% : PROCsaveclick(iconhnd%,but%) 3380WHEN savetext% : PROCsavetextclick(iconhnd%,but%) 3390ENDCASE 3400ENDCASE 3410ENDPROC 3420 3430DEF PROCslabinicons 3440IF hnd% = grid% OR hnd% = words% THEN ENDPROC 3450SYS "Wimp_GetPointerInfo",,block% 3460SYS "Wimp_BorderIcon",,block% 3470ENDPROC 3480 3490DEF PROCslabouticons 3500IF hnd% = grid% OR hnd% = words% THEN ENDPROC 3510SYS "Wimp_GetPointerInfo",,block% 3520block%!8 = 0 3530SYS "Wimp_BorderIcon",,block% 3540ENDPROC 3550 3560DEF PROCremoveclick(iconhnd%,but%) 3570IF iconhnd% <> 1 ENDPROC 3580PROCset_version(remove%,0,"") 3590PROCsetcaret(remove%,0) 3600PROCremove(FNtextfromwritable(remove%,0)) 3610ENDPROC 3620 3630DEF PROCiconbarclick 3640LOCAL dummy% 3650IF griddefined% THEN PROCopengrid ELSE dummy%=FNopennewgrid 3660ENDPROC 3670 3680DEF PROCnewwordclick(iconhnd%) 3690IF iconhnd% = 1 THEN PROCcallnewword 3700ENDPROC 3710 3720DEF PROCcallnewword 3730LOCAL dummy$ 3740dummy$=FNnew_word("I",FNtextfromwritable(newword%,0)) 3750ENDPROC 3760 3770DEF PROCclearnewwordicon 3780PROCset_version(newword%,0,"") 3790PROCsetcaret(newword%,0) 3800ENDPROC 3810 3820DEF PROCnewgridclick(iconhnd%,but%) 3830IF iconhnd% = 4 THEN 3840PROCchecknewgrid 3850PROCslabouticons 3860IF but% = 4 THEN PROCcloseonclick(newgrid%) 3870ENDIF 3880ENDPROC 3890 3900DEF PROCchecknewgrid 3910IF griddefined% = FALSE OR changed% = FALSE THEN PROCnew_grid ELSE IF FNyorn("This will erase the grid you have already made. Click OK to make a new grid, click CANCEL to keep the grid you have already got.") THEN PROCnew_grid 3920ENDPROC 3930 3940DEF PROCoptionsclick(iconhnd%,but%) 3950CASE iconhnd% OF 3960WHEN 1 : bias% = FNswap(bias%) 3970WHEN 2 : wordpartfill% = FNswap(wordpartfill%) 3980WHEN 3 : letterfill% = FNswap(letterfill%) 3990WHEN 5 : background% = FNswap(background%) 4000WHEN 4 : PROCsaveoptions(but%) 4010ENDCASE 4020ENDPROC 4030 4040DEF FNswap(swapee%) 4050IF swapee%=TRUE THEN =FALSE ELSE =TRUE 4060 4070DEF PROCsaveclick(iconhnd%,but%) 4080CASE iconhnd% OF 4090WHEN 0 4100IF but% = &40 THEN 4110drag$ = "norm" 4120PROCdragicon(save%) 4130ENDIF 4140WHEN 2 4150IF INSTR(FNtextfromwritable(save%,1),":") > 0 THEN 4160PROCsavegrid(FNtextfromwritable(save%,1)) 4170IF but% = %100 THEN PROCcloseonclick(save%) 4180ELSE 4190PROCprotestatname 4200ENDIF 4210ENDCASE 4220ENDPROC 4230 4240DEF PROCsavetextclick(iconhnd%,but%) 4250CASE iconhnd% OF 4260WHEN 0 4270IF but% = &40 THEN 4280drag$ = "text" 4290PROCdragicon(savetext%) 4300ENDIF 4310WHEN 2 4320IF INSTR(FNtextfromwritable(savetext%,1),":") > 0 THEN 4330PROCsaveastext(FNtextfromwritable(savetext%,1)) 4340IF but% = %100 THEN PROCcloseonclick(savetext%) 4350ELSE 4360PROCprotestatname 4370ENDIF 4380ENDCASE 4390ENDPROC 4400 4410DEF PROCdragicon(winhnd%) 4420REM Drag save icon out of window 4430LOCAL winbasex%,winbasey% 4440!newblock%=winhnd% 4450SYS "Wimp_GetWindowState",,newblock% 4460winbasex% = newblock%!4 - newblock%!20 4470winbasey% = newblock%!16 - newblock%!24 4480newblock%!4 = 0 4490SYS "Wimp_GetIconState",,newblock% 4500newblock%!4 = 5 4510newblock%!8 += winbasex% 4520newblock%!12 += winbasey% 4530newblock%!16 += winbasex% 4540newblock%!20 += winbasey% 4550newblock%!24 = 0 4560newblock%!28 = 0 4570newblock%!32 = 99999 : REM Can't be bothered to find size of screen. 4580newblock%!36 = 99999 4590SYS "Wimp_DragBox",,newblock% 4600ENDPROC 4610 4620DEF PROCcloseonclick(hnd%) 4630PROCslabouticons 4640!stateblock%=hnd% 4650SYS "Wimp_GetWindowState",,stateblock% 4660SYS "Wimp_CloseWindow",,stateblock% 4670ENDPROC 4680 4690DEF PROCcreate_menu(title$,x%,y%) 4700menuy%=y% 4710PROCbuild_menu(title$,menuy%) 4720menux%=x%-64 4730menuy%=y% 4740SYS "Wimp_CreateMenu",,blk%,menux%,menuy% 4750ENDPROC 4760 4770DEF PROCcreate_icon_menu(title$,x%) 4780menuy%=0 4790PROCbuild_menu(title$,menuy%) 4800menux%=x%-64 4810SYS "Wimp_CreateMenu",,blk%,menux%,menuy% 4820ENDPROC 4830 4840DEF PROCbuild_menu(title$,RETURN height%) 4850LOCAL offset%,i%,menuItems%,dots%,wimpflags,flags,ptr%,name$,ptr$ 4860offset%=FNfind_menu(title$,menu_data%) 4870IF offset%=TRUE THEN ERROR 42,"Can't find menu data" 4880blk$=FNget_menu_item(menu_data%,offset%) 4890blk%=EVAL(blk$) 4900$blk%=LEFT$(title$,12) 4910blk%?12=7 4920blk%?13=2 4930blk%?14=7 4940blk%?15=0 4950blk%!16=200 : REM Width 4960blk%!20=44 4970blk%!24=0 4980i%=28 4990menuItems%=0 5000dots%=0 5010WHILE menu_data%?offset%<>ASC"~" AND menu_data%?offset%<>ASC"^" 5020PROCmenu_item 5030IF RIGHT$(name$,1)="@" THEN name$=LEFT$(name$,LENname$-1):ptr$=FNbuild_submenu(name$,pos%) 5040IF (flags AND 4)=4 THEN 5050instr%=INSTR(ptr$,",") 5060blk%!(i%+12)=EVAL(LEFT$(ptr$,instr%-1)) 5070ptr$=MID$(ptr$,instr%+1) 5080instr%=INSTR(ptr$,",") 5090blk%!(i%+16)=EVAL(LEFT$(ptr$,instr%-1)) 5100ptr$=MID$(ptr$,instr%+1) 5110blk%!(i%+20)=EVAL(ptr$) 5120wimpflags=wimpflags OR 2^8 5130ptr%=-1 5140$(blk%!(i%+12))=LEFT$(name$,blk%!(i%+20)) 5150ELSE 5160$(blk%+i%+12)=LEFT$(name$,12) 5170ptr%=EVAL(ptr$) 5180ENDIF 5190blk%!i%=flags 5200blk%!(i%+4)=ptr% 5210blk%!(i%+8)=wimpflags 5220i%=i%+24 5230menuItems%+=1 5240ENDWHILE 5250height%=96+(menuItems%*44)+(dots%*24) 5260current_menu$=LEFT$($blk%,12) 5270ENDPROC 5280 5290DEF PROCmenu_item 5300wimpflags=&7000021 5310flags=0 5320ptr$="-1" 5330func$="" 5340name$=FNget_menu_item(menu_data%,offset%) 5350IF menu_data%?offset%=ASC"!" offset%+=1:ptr$=FNget_menu_item(menu_data%,offset%) 5360IF menu_data%?offset%=ASC"{" offset%+=1:wimpflags=EVAL(FNget_menu_item(menu_data%,offset%)) 5370IF menu_data%?offset%=ASC"\" offset%+=1:func$=FNget_menu_item(menu_data%,offset%) 5380IF menu_data%?offset%=ASC"~" OR menu_data%?offset%=ASC"^" flags=flags OR &80 5390IF LEFT$(name$,1)="}" THEN flags+=1:name$=MID$(name$,2) 5400IF LEFT$(name$,1)="#" THEN flags+=4:name$=MID$(name$,2) 5410IF RIGHT$(name$,1)="}" THEN flags+=2:name$=LEFT$(name$,LENname$-1):dots%+=1 5420ENDPROC 5430 5440DEF FNbuild_submenu(title$,pos%) 5450LOCAL blk$,blk% 5460PROCbuild_menu(title$,pos%) 5470=blk$ 5480 5490DEF PROCmenu_select 5500SYS "Wimp_GetPointerInfo",,q% 5510but%=q%!8 5520depth%=0 5530PROCdecode_menu(current_menu$) 5540IF (but% AND 1)=1 THEN 5550PROCre_openmenu(current_menu$,menux%,menuy%) 5560ELSE 5570current_menu$="" 5580ENDIF 5590ENDPROC 5600 5610DEF PROCre_openmenu(title$,menx%,meny%) 5620offset%=FNfind_menu(title$,menu_data%) 5630blk%=EVAL(FNget_menu_item(menu_data%,offset%)) 5640SYS "Wimp_CreateMenu",,blk%,menx%,meny% 5650current_menu$=title$ 5660ENDPROC 5670 5680DEF PROCdecode_menu(title$) 5690LOCAL men_loop%,func$ 5700offset%=FNfind_menu(title$,menu_data%) 5710blk%=EVAL(FNget_menu_item(menu_data%,offset%)) 5720men_loop%=0 5730WHILE men_loop%<=block%!depth% 5740dots%=0 5750PROCmenu_item 5760men_loop%+=1 5770ENDWHILE 5780IF block%!depth%>-1 THEN 5790IF RIGHT$(name$,1)="@" THEN 5800name$=LEFT$(name$,LENname$-1) 5810depth%+=4 5820PROCdecode_menu(name$) 5830ENDIF 5840IF func$<>"" THEN a=EVAL("FN"+func$) 5850ENDIF 5860ENDPROC 5870 5880DEF FNtemplates(file$) 5890DIM Q% 2048, P% 2048, O% 2048, N% 4096, M% 2048, L% 2048, K% 2048, J% 2048, I% 2048, H% 2048, G% 2048, F% 2048 5900maxws%=&900 5910DIM indir% maxws%, indir2% maxws%, indir3% maxws%, indir4% maxws%, indir5% maxws%, indir6% maxws%, indir7% maxws%, indir8% maxws%, indir9% maxws%, indir10% maxws%, indir11% maxws%, indir12% maxws% 5920SYS "Wimp_OpenTemplate",,file$ 5930SYS "Wimp_LoadTemplate",,Q%,indir%,indir%+maxws%,-1,"info",0 5940SYS "Wimp_LoadTemplate",,P%,indir2%,indir2%+maxws%,-1,"grid",0 5950SYS "Wimp_LoadTemplate",,O%,indir3%,indir3%+maxws%,-1,"words",0 5960SYS "Wimp_LoadTemplate",,N%,indir4%,indir4%+maxws%,-1,"options",0 5970SYS "Wimp_LoadTemplate",,M%,indir5%,indir5%+maxws%,-1,"newgrid",0 5980SYS "Wimp_LoadTemplate",,L%,indir6%,indir6%+maxws%,-1,"save",0 5990SYS "Wimp_LoadTemplate",,K%,indir7%,indir7%+maxws%,-1,"newword",0 6000SYS "Wimp_LoadTemplate",,J%,indir8%,indir8%+maxws%,-1,"fitting",0 6010SYS "Wimp_LoadTemplate",,I%,indir9%,indir9%+maxws%,-1,"auto",0 6020SYS "Wimp_LoadTemplate",,H%,indir10%,indir10%+maxws%,-1,"savetext",0 6030SYS "Wimp_LoadTemplate",,G%,indir11%,indir11%+maxws%,-1,"stats",0 6040SYS "Wimp_LoadTemplate",,F%,indir12%,indir12%+maxws%,-1,"remove",0 6050SYS "Wimp_CreateWindow",,Q% TO info% 6060SYS "Wimp_CreateWindow",,P% TO grid% 6070SYS "Wimp_CreateWindow",,O% TO words% 6080SYS "Wimp_CreateWindow",,N% TO options% 6090SYS "Wimp_CreateWindow",,M% TO newgrid% 6100SYS "Wimp_CreateWindow",,L% TO save% 6110SYS "Wimp_CreateWindow",,K% TO newword% 6120SYS "Wimp_CreateWindow",,J% TO fitting% 6130SYS "Wimp_CreateWindow",,I% TO auto% 6140SYS "Wimp_CreateWindow",,H% TO savetext% 6150SYS "Wimp_CreateWindow",,G% TO stats% 6160SYS "Wimp_CreateWindow",,F% TO remove% 6170SYS "Wimp_CloseTemplate" 6180PROCsetallicons 6190=info% 6200 6210DEF PROCsetallicons 6220PROCsetoptionsicons 6230PROCset_version(save%,1,"Wordfile") 6240PROCset_version(savetext%,1,"Textfile") 6250PROCset_version(newgrid%,2,"20") 6260PROCset_version(newgrid%,3,"20") 6270ENDPROC 6280 6290DEF PROCset_version(pt%,H%,ver$) 6300!q%=pt% 6310q%!4=H% 6320SYS "Wimp_GetIconState",,q% 6330$q%!28=ver$ 6340q%!8=0 6350q%!12=0 6360WAIT 6370SYS "Wimp_SetIconState",,q% 6380ENDPROC 6390 6400DEF PROCfinishwimp 6410SYS "Wimp_CloseDown",handle%,!q% 6420SYS "Wimp_ReleaseInterface",handle% 6430CLOSE# 0 6440SYS "Hourglass_Smash" 6450END 6460ENDPROC 6470 6480DEF FNyorn(text$) 6490REM Report message - return true or false 6500PROCslabouticons 6510LOCAL answer% 6520!okblock%=224 6530$(okblock%+4)=text$+CHR$0 6540SYS "Wimp_ReportError",okblock%,%111,"Wordsearch" TO ,answer% 6550IF answer%=1 THEN 6560=TRUE 6570ELSE 6580=FALSE 6590ENDIF 6600 6610DEF PROCok(text$) 6620REM Report message 6630PROCslabouticons 6640!okblock%=224 6650$(okblock%+4)=text$+CHR$0 6660SYS "Wimp_ReportError",okblock%,%1,"Wordsearch" 6670ENDPROC 6680 6690DEF PROCerror 6700ON ERROR OFF 6710REM Report REAL error 6720LOCAL dummy$,fred% 6730IF handle% > -1 THEN SYS "Wimp_DragBox",,0 : PROCslabouticons 6740CLOSE#0 6750ON ERROR PROCerror 6760IF FNyorn("(Internal error code "+STR$(ERL)+","+STR$(ERR)+") "+REPORT$+" Click OK to continue or Cancel to Quit.") THEN dummy$=FNaction(FALSE) ELSE fred%=FNfin 6770ENDPROC 6780 6790REM 380 by 768 6800DEF PROCopengrid 6810PROCopenanywindow(grid%,50,200,430,968) 6820ENDPROC 6830 6840REM 1104 BY 860 6850DEF FNopenwords 6860PROCopenanywindow(words%,460,200,1564,1060) 6870=0 6880 6890REM 1062 by 368 6900DEF FNopenoptions 6910PROCopenanywindow(options%,100,200,1162,568) 6920=0 6930 6940DEF PROCsetoptionsicons 6950IF bias% THEN PROCsetradio(options%,1) 6960IF wordpartfill% THEN PROCsetradio(options%,2) 6970IF letterfill% THEN PROCsetradio(options%,3) 6980IF background% THEN PROCsetradio(options%,5) 6990ENDPROC 7000 7010REM 438 by 200 7020DEF FNopennewword 7030PROCopenanywindow(newword%,200,200,638,400) 7040=0 7050 7060REM 486 by 300 7070DEF FNopennewgrid 7080PROCopenanywindow(newgrid%,600,200,1086,500) 7090=0 7100 7110REM 316 by 184 7120DEF FNopensave 7130PROCopenanywindow(save%,500,500,816,684) 7140=0 7150 7160REM 438 by 200 7170DEF FNopenremove 7180PROCopenanywindow(remove%,500,500,938,700) 7190=0 7200 7210REM 620 by 220 7220DEF PROCopenfitting 7230PROCset_version(fitting%,0,"Pause") 7240PROCopenanywindow(fitting%,500,130,1120,350) 7250ENDPROC 7260 7270REM 614 by 148 - Actually it's now smaller than that. 7280DEF PROCopenauto 7290PROCopenanywindow(auto%,500,400,1114,548) 7300ENDPROC 7310 7320DEF PROCopenanywindow(windowhandle%,x0%,y0%,x1%,y1%) 7330!newblock%=windowhandle% 7340newblock%!4=x0% 7350newblock%!8=y0% 7360newblock%!12=x1% 7370newblock%!16=y1% 7380newblock%!20=0 7390newblock%!24=0 7400newblock%!28=-1 7410SYS "Wimp_OpenWindow",,newblock% 7420ENDPROC 7430 7440DEF PROCclose 7450SYS "Wimp_CloseWindow",,block% 7460ENDPROC 7470 7480DEF PROCopen 7490SYS "Wimp_OpenWindow",,block% 7500ENDPROC 7510 7520DEF FNget_menu_item(db%,RETURN off%) 7530LOCAL st$ 7540WHILE db%?off%<>10 AND db%?off%<>13 7550st$+=CHR$(db%?off%) 7560off%+=1 7570ENDWHILE 7580off%+=1 7590=st$ 7600 7610DEF FNfind_menu(name$,data%) 7620LOCAL fi$ 7630name$="^"+name$ 7640offset%=0 7650REPEAT 7660fi$=FNget_menu_item(data%,offset%) 7670UNTIL fi$=name$ OR fi$="~" 7680IF fi$="~" THEN =TRUE 7690=offset% 7700 7710DEF PROCflip 7720main_blk%!28=main_blk%!28 EOR 1 7730ENDPROC 7740 7750DEF FNmenuauto 7760PROCauto 7770=0 7780 7790DEF FNtextfromwritable(windowhnd%,iconhnd%) 7800REM Read text in writable icon 7810LOCAL thetext$ 7820!text%=windowhnd% 7830text%!4=iconhnd% 7840SYS "Wimp_GetIconState",,text% 7850=$text%!28 7860 7870DEF FNfinfrommenu 7880PROCfinish 7890PROCupdatequalities 7900=0 7910 7920DEF PROCsetradio(winhnd%,iconhnd%) 7930!q%=winhnd% 7940q%!4=iconhnd% 7950SYS "Wimp_GetIconState",,q% 7960q%!8 = 1<<21 7970q%!12 = 1<<21 7980SYS "Wimp_SetIconState",,q% 7990ENDPROC 8000 8010DEF FNfin 8020IF griddefined% = TRUE AND saved% = FALSE THEN 8030IF FNraiseobjection = TRUE THEN PROCfinishwimp 8040ELSE 8050PROCfinishwimp 8060ENDIF 8070=0 8080 8090DEF FNprint 8100PROCprint 8110=0 8120 8130DEF FNsecondaryclick(windowhnd%,returnedhnd%,iconhnd%,but%,mx%,my%) 8140LOCAL condition$,result$ 8150CASE but% OF 8160WHEN %010 8170menux% = mx%-64 8180menuy% = men3y% 8190menheight% = men3height% 8200IF returnedhnd% = -2 THEN PROCre_openmenu(" Wordsearch ",menux%,menheight%) ELSE PROCre_openmenu(" Wordsearch ",menux%,my%) 8210WHEN %100,%001 8220IF returnedhnd% = -2 THEN PROCiconbarclick:="" 8230IF returnedhnd% <> auto% AND returnedhnd% <> fitting% THEN ="" 8240PROCslabinicons 8250condition$ = FNtextfromwritable(windowhnd%,iconhnd%) 8260CASE iconhnd% OF 8270WHEN 0 8280result$ = condition$ 8290PROCtogglecondition(condition$) 8300WHEN 1 8310IF returnedhnd% = fitting% THEN result$ = "Cancel" ELSE result$ = "Cancelauto" 8320ENDCASE 8330PROCslabouticons 8340ENDCASE 8350=result$ 8360 8370DEF PROCtogglecondition(condition$) 8380IF condition$ = "Pause" THEN condition$ = "Continue" ELSE condition$ = "Pause" 8390PROCset_version(windowhnd%,0,condition$) 8400ENDPROC 8410 8420DEF PROCsettitlebar(hnd%,titlestring$) 8430!block% = hnd% 8440SYS "Wimp_GetWindowInfo",,block% 8450$(block%!76) = titlestring$ + CHR$0 8460ENDPROC 8470 8480DEF FNhelp 8490REM Start Universal Application Help as a subtask 8500SYS "Hourglass_On" 8510$(newblock%) = "Obey <Word$Dir>.LoadHelp" +CHR$0 8520SYS "Wimp_StartTask",newblock% 8530SYS "Hourglass_Off" 8540=0 8550 8560DEF PROCprotestatname 8570PROCslabouticons 8580PROCok("Drag the file icon into a Filer window to save.") 8590ENDPROC 8600 8610DEF PROCupdatequalities 8620PROCset_version(stats%,2,FNwordqualitystring) 8630PROCset_version(stats%,3,FNfillqualitystring) 8640ENDPROC 8650 8660DEF PROCclearqualities 8670PROCset_version(stats%,2,"") 8680PROCset_version(stats%,3,"") 8690ENDPROC 8700 8710DEF PROCclearfillquality 8720PROCset_version(stats%,3,"") 8730possiblefills% = 0 8740actualfills = 0 8750ENDPROC 8760 8770DEF FNcleargaps 8780PROCcheckforholes 8790PROCupdategrid(0) 8800PROCclearfillquality 8810=0 8820 8830REM********************************************************************** 8840REM********************* ************************** 8850REM********************* Wordsearch code ************************** 8860REM********************* ************************** 8870REM********************************************************************** 8880 8890DEF PROCsetbackgroundmask 8900mask% = %10011111100110110000 8910ENDPROC 8920 8930REM >Word3 8940REM Version: 3 8950REM Some of this, particularly word-fitting section, was written some time ago. Had to be altered somewhat. Apologies for messyness 8960 8970DEF PROCremove(removeword$) 8980LOCAL rnum%,letter% 8990IF LEN(removeword$) = 0 THEN ENDPROC 9000rnum% = FNsearchthroughwords(FNupper_case(removeword$)) 9010IF rnum% = 999 THEN PROCok("Word not found"):ENDPROC 9020SYS "Hourglass_On" 9030PROCdeleteword(rnum%) 9040PROCshiftwordsup(rnum%) 9050PROCcheckforholes 9060PROCupdatewords 9070PROCupdategrid(0) 9080PROCupdatequalities 9090PROCclearfillquality 9100PROCclearremoveicon 9110SYS "Hourglass_Off" 9120ENDPROC 9130 9140DEF PROCdeleteword(rnum%) 9150LOCAL x%,y% 9160FOR letter% = 1 TO LEN(words$(rnum%)) 9170x% = wordsx%(rnum%)+(letter%*wordshoriz%(rnum%)) 9180y% = wordsy%(rnum%)+(letter%*wordsvert%(rnum%)) 9190numbers%(x%,y%) -= 1 9200IF numbers%(x%,y%) = 0 THEN fitquality -= 1 9210NEXT letter% 9220ENDPROC 9230 9240DEF FNsearchthroughwords(searchword$) 9250LOCAL thisword%,number% 9260number% = 999 9270FOR thisword% = 1 TO number_of_words% 9280IF words$(thisword%) = searchword$ THEN number% = thisword% : thisword% = number_of_words% 9290NEXT thisword% 9300=number% 9310 9320DEF PROCshiftwordsup(number%) 9330LOCAL thisword% 9340FOR thisword% = number% TO number_of_words%-1 9350words$(thisword%) = words$(thisword%+1) 9360wordsx%(thisword%) = wordsx%(thisword%+1) 9370wordsy%(thisword%) = wordsy%(thisword%+1) 9380wordsvert%(thisword%) = wordsvert%(thisword%+1) 9390wordshoriz%(thisword%) = wordshoriz%(thisword%+1) 9400NEXT thisword% 9410words$(number_of_words%) = "" 9420number_of_words% -= 1 9430ENDPROC 9440 9450DEF PROCcheckforholes 9460LOCAL x%,y% 9470FOR x% = 1 TO xsize%+1 9480FOR y% = 1 TO ysize%+1 9490IF numbers%(x%,y%) = 0 THEN grid$(x%,y%) = "" 9500NEXT y% 9510NEXT x% 9520ENDPROC 9530 9540DEF PROCauto 9550LOCAL cancelled% 9560cancelled% = FALSE 9570IF background% = TRUE THEN 9580PROCopenauto 9590but% = %100 9600ELSE 9610SYS "Hourglass_On" 9620ENDIF 9630failcount% = 0 9640dictionary = OPENIN("<Word$Dir>.Dictionary") 9650REPEAT 9660IF background% AND FNnew_word("D","dummy") = "Cancel" THEN cancelled% = TRUE 9670PROCupdatequalities 9680UNTIL failcount% = 5 OR number_of_words% = maxwords% OR cancelled% = TRUE 9690CLOSE#dictionary 9700IF (background% AND cancelled% = FALSE) OR background% = FALSE THEN PROCfinish 9710IF background% THEN 9720PROCcloseonclick(auto%) 9730ELSE 9740SYS "Hourglass_Off" 9750ENDIF 9760ENDPROC 9770 9780DEF FNnew_word(source$,passedword$) 9790REM Place new word on grid "I" = Input new word "D" = Use Dictionary 9800LOCAL maxlength%,newword$,vert%,horiz%,x%,y%,priority%,decidedx%,decidedy%,decidedvert%,decidedhoriz%,ran%,letter%,xstart%,ystart% 9810IF number_of_words% = maxwords% THEN PROCok("Sorry, no more words can be fitted") : ="" 9820priority% = -1 9830ran%=RND(2) 9840maxlength% = FNmax(xsize%,ysize%) 9850IF source$ = "I" THEN 9860newword$ = FNstripleadingspaces(FNupper_case(passedword$)) 9870PROCclearnewwordicon 9880IF LEN(newword$) = 0 THEN ="" 9890ELSE newword$ = FNupper_case(FNdict) 9900ENDIF 9910IF xsize% > 1 THEN xstart% = RND(xsize%) ELSE xstart% = 1 9920IF ysize% > 1 THEN ystart% = RND(ysize%) ELSE ystart% = 1 9930IF background% = TRUE THEN 9940PROCsetbackgroundmask 9950PROCslabouticons 9960PROCsettitlebar(fitting%,"Fitting word "+newword$) 9970PROCopenfitting 9980ELSE 9990SYS "Hourglass_On" 10000ENDIF 10010FOR vert% = -1 TO 1 10020FOR horiz% = -1 TO 1 10030IF NOT ( horiz% = 0 AND vert% = 0 ) THEN 10040REM Unfortunalely FOR....NEXT won't do this... 10050x% = xstart% 10060REPEAT 10070IF background% THEN 10080CASE FNaction(fitting%) OF 10090WHEN "Cancel" :PROCcloseonclick(fitting%):PROCresetmask:="" 10100WHEN "Cancelauto":PROCcloseonclick(fitting%):PROCresetmask:="Cancel" 10110ENDCASE 10120ENDIF 10130y% = ystart% 10140REPEAT 10150thispriority% = FNpriority(x%,y%,vert%,horiz%,newword$) 10160IF (bias% AND thispriority% > priority%) OR ((NOT bias%) AND ran%=1 AND thispriority% > priority%) OR ((NOT bias%) AND ran%=2 AND thispriority% >= priority%) THEN 10170priority% = thispriority% 10180decidedvert% = vert% 10190decidedhoriz% = horiz% 10200decidedx% = x% 10210decidedy% = y% 10220IF priority% > -1 AND changed% = FALSE THEN y%=ystart%-1:x%=xstart%-1:horiz%=1:vert%=1 10230ENDIF 10240IF y% > 0 THEN y% -= 1 ELSE y% = ysize%+1 10250UNTIL y% = ystart% 10260IF x% > 0 THEN x% -= 1 ELSE x% = xsize%+1 10270UNTIL x% = xstart% 10280ENDIF 10290NEXT horiz% 10300NEXT vert% 10310IF background% = TRUE THEN 10320PROCcloseonclick(fitting%) 10330PROCresetmask 10340ELSE 10350SYS "Hourglass_Off" 10360ENDIF 10370IF source$ = "I" THEN 10380IF priority% = -1 THEN PROCok("Sorry, word won't fit!") : ="" 10390ELSE 10400IF priority% = -1 THEN 10410failcount% += 1 10420="" 10430ELSE 10440failcount% = 0 10450ENDIF 10460ENDIF 10470number_of_words%+=1 10480fitquality += LEN(newword$)-priority% 10490FOR letter% = 1 TO LEN(newword$) 10500grid$(decidedx%+(letter%*decidedhoriz%),decidedy%+(letter%*decidedvert%)) = MID$(newword$,letter%,1) 10510numbers%(decidedx%+(letter%*decidedhoriz%),decidedy%+(letter%*decidedvert%)) += 1 10520NEXT letter% 10530words$(number_of_words%) = newword$ 10540wordsx%(number_of_words%) = decidedx% 10550wordsy%(number_of_words%) = decidedy% 10560wordsvert%(number_of_words%) = decidedvert% 10570wordshoriz%(number_of_words%) = decidedhoriz% 10580longestword% = FNmax(longestword%,LEN(newword$)) 10590changed% = TRUE 10600saved% = FALSE 10610PROCupdatewords 10620PROCupdategrid(0) 10630PROCupdatequalities 10640="" 10650 10660DEF FNpriority(x%,y%,vert%,horiz%,newword$) 10670REM check priority of word placing 10680LOCAL priority%,letter% 10690REM Check word is within grid boundaries. 10700IF(x%+(horiz%*LEN(newword$))>xsize%)OR(x%+(horiz%*LEN(newword$))<=0)OR(y%+(vert%*LEN(newword$))>ysize%)OR(y%+(vert%*LEN(newword$))<=0) THEN 10710= -1 10720ENDIF 10730priority% = -1 10740REM Check if each space is empty, different or the same as letters in the word. 10750FOR letter% = 1 TO LEN(newword$) 10760CASE grid$(x%+(horiz%*letter%),y%+(vert%*letter%)) OF 10770WHEN MID$(newword$,letter%,1) : IF priority% < 0 THEN priority% = 1 ELSE priority% += 1 10780WHEN "" : IF priority% < 0 priority%=0 10790OTHERWISE : priority% = -1 : letter% = LEN(newword$) 10800ENDCASE 10810NEXT letter% 10820REM Next line takes care of the same word being used twice. 10830IF priority% = LEN(newword$) THEN 10840= -1 10850ENDIF 10860=priority% 10870 10880DEF PROCnew_grid 10890REM prepare new grid 10900IF LEN(FNtextfromwritable(newgrid%,2)) < 1 OR LEN(FNtextfromwritable(newgrid%,3)) < 1 THEN ENDPROC 10910IF INT(EVAL(FNtextfromwritable(newgrid%,2))) > 20 OR INT(EVAL(FNtextfromwritable(newgrid%,2))) < 0 OR INT(EVAL(FNtextfromwritable(newgrid%,3))) > 20OR INT(EVAL(FNtextfromwritable(newgrid%,3))) < 0 THEN ERROR 223, "Size must be 20 or less" 10920SYS "Hourglass_On" 10930PROCcleargrid 10940xsize%=INT(EVAL(FNtextfromwritable(newgrid%,2))) 10950ysize%=INT(EVAL(FNtextfromwritable(newgrid%,3))) 10960LOCAL x%,y%,i%,thisword% 10970FOR thisword% = 1 TO maxwords% 10980words$(thisword%) = "" 10990NEXT thisword% 11000number_of_words% = 0 11010longestword% = 0 11020fitquality = 0 11030possiblefills% = 0 11040actualfills = 0 11050FOR x%=1 TO xsize% 11060FOR y%=1 TO ysize% 11070grid$(x%,y%) = "" 11080NEXT y% 11090NEXT x% 11100griddefined% = TRUE 11110changed% = FALSE 11120saved% = FALSE 11130PROCupdategrid(0) 11140PROCupdatewords 11150PROCopengrid 11160PROCclearqualities 11170SYS "Hourglass_Off" 11180ENDPROC 11190 11200DEF PROCprint 11210REM print grid 11220LOCAL line%,word%,s1$,s2$,online% 11230SYS "Hourglass_On" 11240REPEAT 11250online% = FNisprinteron 11260IF online% = FALSE THEN IF NOT FNyorn("Printer is offline. Try again?") THEN SYS "Hourglass_Off" : ENDPROC 11270UNTIL online% = TRUE 11280VDU 2 11290PRINT ' 11300FOR line% = 1 TO ysize% 11310PRINT FNgridtostring(line%) 11320NEXT line% 11330PRINT ' 11340FOR word% = 1 TO INT(number_of_words%/3) 11350PRINTwords$(word%);SPC(25-LEN(words$(word%)));words$(word%+1);SPC(25-LEN(words$(word%+1)));words$(word%+2);SPC(25-LEN(words$(word%+2))) 11360NEXT word% 11370PRINT ' 11380s1$="Word fitting quality is "+FNwordqualitystring+":1" 11390s2$="Gap filling quality is "+FNfillqualitystring+"%" 11400PRINT s1$ 11410PRINT s2$ 11420VDU 3 11430SYS "Hourglass_Off" 11440ENDPROC 11450 11460DEF PROCsaveastext(filename$) 11470REM Bit similar to above! 11480IF FNdoesfileexist(filename$) THEN IF NOT FNyorn("File already exists. Overwrite?") THEN ENDPROC 11490LOCAL line%,word% 11500IF FNdoesfileexist(filename$) THEN SYS "OS_File",&06,filename$ :REM Delete old file 11510SYS "OS_File",&0B,filename$,&FFF :REM Create new one 11520textfile = OPENUP(filename$) 11530FOR line% = 1 TO ysize% 11540BPUT#textfile,FNgridtostring(line%) 11550NEXT line% 11560BPUT#textfile," " : REM CR 11570FOR word% = 1 TO number_of_words% 11580BPUT#textfile,words$(word%) 11590NEXT word% 11600IF changed% THEN 11610BPUT#textfile," " : REM CR 11620BPUT#textfile,"Word fitting quality is "+FNwordqualitystring+":1" 11630BPUT#textfile,"Gap filling quality is "+FNfillqualitystring+"%" 11640ENDIF 11650CLOSE#textfile 11660ENDPROC 11670 11680DEF FNgridtostring(line%) 11690REM Return specified line of grid as string 11700LOCAL string$,x% 11710FOR x% = 1 TO xsize% 11720IF grid$(x%,line%)="" THEN string$+="-" ELSE string$+=grid$(x%,line%) 11730NEXT x% 11740=string$ 11750 11760DEF PROCsaveoptions(but%) 11770LOCAL optionsfile 11780optionsfile = OPENOUT("<Word$Dir>.Options") 11790PRINT#optionsfile,bias%,letterfill%,wordpartfill%,background% 11800CLOSE# optionsfile 11810IF but% = 4 THEN PROCcloseonclick(options%) 11820ENDPROC 11830 11840DEFPROCloadoptions 11850LOCAL optionsfile 11860optionsfile = OPENIN("<Word$Dir>.Options") 11870INPUT#optionsfile,bias%,letterfill%,wordpartfill%,background% 11880CLOSE# optionsfile 11890ENDPROC 11900 11910DEF PROCsavegrid(path$) 11920REM Save grid 11930IF FNdoesfileexist(path$) THEN IF NOT FNyorn("File already exists. Overwrite?") THEN ENDPROC 11940LOCAL file,x%,y%,word% 11950file = OPENOUT(path$) 11960PRINT#file,check$,xsize%,ysize%,number_of_words%,longestword%,fitquality,possiblefills%,actualfills,changed% 11970FOR x% = 1 TO xsize% 11980FOR y% = 1 TO ysize% 11990PRINT#file,grid$(x%,y%) 12000PRINT#file,numbers%(x%,y%) 12010NEXT y% 12020NEXT x% 12030FOR word% = 1 TO number_of_words% 12040PRINT#file,words$(word%) 12050PRINT#file,wordsx%(word%) 12060PRINT#file,wordsy%(word%) 12070PRINT#file,wordsvert%(word%) 12080PRINT#file,wordshoriz%(word%) 12090NEXT word% 12100CLOSE#file 12110$newblock% = path$ 12120SYS "OS_File",&12,newblock%,mytype% 12130REM 34 IS A " AND &12 IS SETTYPE 12140saved% = TRUE 12150ENDPROC 12160 12170DEF FNdoesfileexist(filename$) 12180LOCAL type,load,exec,len,att 12190SYS "OS_File",&05,filename$ TO type,,load,exec,len,att 12200IF type = 0 THEN 12210=FALSE 12220ELSE 12230=TRUE 12240ENDIF 12250 12260DEF PROCloadgrid(filename$) 12270REM Load new grid 12280LOCAL file,x%,y%,word%,thischeck$ 12290file = OPENIN(filename$) 12300INPUT#file,thischeck$,xsize%,ysize%,number_of_words%,longestword%,fitquality,possiblefills%,actualfills,changed% 12310IF thischeck$ <> check$ THEN PROCok("This file is incompatible with this version of the wordsearch creator") : ENDPROC 12320FOR x% = 1 TO xsize% 12330FOR y% = 1 TO ysize% 12340INPUT#file,grid$(x%,y%) 12350INPUT#file,numbers%(x%,y%) 12360NEXT y% 12370NEXT x% 12380FOR word% = 1 TO number_of_words% 12390INPUT#file,words$(word%) 12400INPUT#file,wordsx%(word%) 12410INPUT#file,wordsy%(word%) 12420INPUT#file,wordsvert%(word%) 12430INPUT#file,wordshoriz%(word%) 12440NEXT word% 12450CLOSE# file 12460PROCupdatewords 12470PROCupdategrid(0) 12480IF changed% = TRUE THEN PROCupdatequalities ELSE PROCclearqualities 12490griddefined% = TRUE 12500saved% = TRUE 12510ENDPROC 12520 12530DEF PROCfinish 12540REM fill in empty spaces in grid 12550LOCAL x%,y%,horiz%,vert%,thislength%,decidedx%,decidedy%,decidedvert%,decidedhoriz% 12560IF background% = TRUE THEN 12570PROCsetbackgroundmask 12580PROCsettitlebar(fitting%,"Filling in spaces") 12590PROCopenfitting 12600but% = %100 12610ELSE 12620SYS "Hourglass_On" 12630ENDIF 12640FOR x% = 1 TO xsize% 12650FOR y% = 1 TO ysize% 12660IF background% THEN IF FNaction(fitting%) = "Cancel" THEN PROCcloseonclick(fitting%):ENDPROC 12670IF grid$(x%,y%) = "" THEN 12680highestlength% = 0 12690FOR horiz% = 1 TO -1 STEP -1 12700FOR vert% = 1 TO -1 STEP -1 12710IF background% THEN IF FNaction(fitting%) = "Cancel" THEN PROCcloseonclick(fitting%):PROCupdatequalities:ENDPROC 12720IF NOT( horiz% = 0 AND vert% = 0) THEN 12730thislength% = 1 12740WHILE grid$(x%+(horiz%*thislength%),y%+(vert%*thislength%))="" AND x%+(horiz%*thislength%) > 0 AND x%+(horiz%*thislength%) <= xsize% AND y%+(vert%*thislength%) > 0 AND y%+(vert%*thislength%) <= ysize% AND thislength% < longestword% 12750IF thislength% > highestlength% THEN 12760highestlength% = thislength% 12770decidedvert% = vert% 12780decidedhoriz% = horiz% 12790ENDIF 12800thislength% += 1 12810ENDWHILE 12820ENDIF 12830NEXT vert% 12840NEXT horiz% 12850REM Try all directions from same point then... 12860IF wordpartfill% AND highestlength%>1 AND number_of_words% > 1 THEN PROCwordpartfill(x%,y%,decidedvert%,decidedhoriz%,highestlength%) ELSE IF letterfill% AND number_of_words% > 0 THEN PROCletterfill(x%,y%) ELSE PROCanyoldletter(x%,y%) 12870ENDIF 12880NEXT y% 12890NEXT x% 12900IF background% = TRUE THEN 12910PROCcloseonclick(fitting%) 12920PROCresetmask 12930ELSE 12940SYS "Hourglass_Off" 12950ENDIF 12960PROCupdatequalities 12970ENDPROC 12980 12990DEFPROCwordpartfill(x%,y%,vert%,horiz%,length%) 13000REM Pick section from word already used for set of holes in grid. 13010LOCAL ranword%,letter%,ranletter%,place%,filltype% 13020filltype% = RND(2) 13030REPEAT 13040IF number_of_words% > 1 THEN ranword% = RND(number_of_words%) ELSE ranword% = 1 13050UNTIL LEN(words$(ranword%))-1 >= length% 13060ranletter% = RND(LEN(words$(ranword%))) 13070place% = 0 13080FOR letter% = 0 TO length% 13090IF letter% <> ranletter% THEN 13100CASE filltype% OF 13110WHEN 1 13120grid$(x%+(horiz%*place%),y%+(vert%*place%)) = MID$(words$(ranword%),letter%,1) 13130WHEN 2 13140grid$(x%+(horiz%*place%),y%+(vert%*place%)) = MID$(words$(ranword%),LEN(words$(ranword%))-length%+letter%,1) 13150ENDCASE 13160place% += 1 13170ENDIF 13180NEXT letter% 13190possiblefills% += length% 13200actualfills += length% 13210changed% = TRUE 13220saved% = FALSE 13230PROCupdategrid(0) 13240ENDPROC 13250 13260DEF PROCletterfill(x%,y%) 13270REM Pick letter already used in word for single space in grid. 13280LOCAL chosenword$,chosenletter$ 13290IF number_of_words% = 1 THEN chosenword$ = words$(1) ELSE chosenword$ = words$(RND(number_of_words%)) 13300chosenletter$ = MID$(chosenword$,INT(RND(LEN(chosenword$))),1) 13310grid$(x%,y%) = chosenletter$ 13320possiblefills% += 1 13330actualfills += 0.5 13340changed% = TRUE 13350saved% = FALSE 13360PROCupdategrid(y%) 13370ENDPROC 13380 13390DEF PROCanyoldletter(x%,y%) 13400REM Pick any letter for single space 13410LOCAL character$ 13420character$ = CHR$(RND(24)+65) 13430grid$(x%,y%) = character$ 13440changed% = TRUE 13450saved% = FALSE 13460possiblefills% += 1 13470PROCupdategrid(y%) 13480ENDPROC 13490 13500DEF PROCcleargrid 13510REM Clear all icons in the grid window 13520LOCAL y% 13530FOR y% = 1 TO maxgridsize% 13540PROCset_version(grid%,y%," ") 13550NEXT y% 13560ENDPROC 13570 13580DEF PROCupdategrid(line%) 13590REM display grid 13600IF line% = 0 THEN 13610LOCAL y% 13620FOR y% = 1 TO ysize% 13630PROCset_version(grid%,INT((maxgridsize%-ysize%)/2)+y%,FNgridtostring(y%)) 13640NEXT y% 13650ELSE 13660PROCset_version(grid%,INT((maxgridsize%-ysize%)/2)+line%,FNgridtostring(line%)) 13670ENDIF 13680ENDPROC 13690 13700DEF FNwordquality 13710=FNfix(2,fitquality/SUMLENwords$()) 13720 13730DEF FNfillquality 13740=INT((actualfills/possiblefills%)*100) 13750 13760DEF FNwordqualitystring 13770IF number_of_words% > 0 THEN 13780=LEFT$(STR$(FNwordquality),4) 13790ELSE 13800="" 13810ENDIF 13820 13830DEF FNfillqualitystring 13840IF possiblefills% > 0 THEN 13850=STR$(FNfillquality) 13860ELSE 13870="" 13880ENDIF 13890 13900DEF PROCupdatewords 13910REM update list of words 13920LOCAL word% 13930FOR word% = 1 TO maxwords% 13940PROCset_version(words%,word%-1,words$(word%)) 13950NEXT word% 13960ENDPROC 13970 13980DEF FNdict 13990REM Pick word from dictionary 14000LOCAL letter$,word$ 14010REPEAT 14020PTR#dictionary = RND((EXT#dictionary )+1)-1 14030REPEAT 14040PTR#dictionary = PTR#dictionary-2 14050UNTIL CHR$(BGET#dictionary) = CHR$(10) : REM Newline 14060REPEAT 14070letter$ = CHR$(BGET#dictionary) 14080word$ += letter$ 14090UNTIL letter$ = CHR$(10) 14100word$ = MID$(word$,1,LEN(word$)-1) 14110UNTIL LEN(word$) <= maxgridsize% 14120=word$ 14130 14140DEF FNmax(a%,b%) 14150IF a%>b% THEN =a% ELSE =b% 14160 14170DEF FNfix(dp%,num) 14180=INT(num*(10^dp%))/(10^dp%) 14190 14200DEF FNupper_case(word$) 14210REM puts word$ into upper case 14220LOCAL converted$,letter% 14230FOR letter% = 1 TO LEN(word$) 14240IF ASC(MID$(word$,letter%,1)) > 96 THEN 14250converted$ += CHR$(ASC(MID$(word$,letter%,1))-32) 14260ELSE 14270converted$ += MID$(word$,letter%,1) 14280ENDIF 14290NEXT letter% 14300=converted$ 14310 14320DEF FNstripleadingspaces(word$) 14330WHILE LEFT$(word$,1) = " " 14340word$ = MID$(word$,2) 14350ENDWHILE 14360WHILE RIGHT$(word$,1) = " " 14370word$ = MID$(word$,1,LEN(word$)-1) 14380ENDWHILE 14390=word$ 14400 14410DEF PROCinit 14420LOCAL i% 14430check$ = "@*&^!#��" 14440REM following line sets maximum size of grids. Can be changed to anything (within reason). 14450maxgridsize%=20 14460REM following line sets maximum number of words. Again, can be changed. 14470REM MUST BE DIVISABLE BE 3 (FOR PRINT ROUNTINE) 14480maxwords%=60 14490quit%=0 14500PROCloadoptions 14510DIM grid$(maxgridsize%+1,maxgridsize%+1), numbers%(maxgridsize%+1,maxgridsize%+1), words$(maxwords%), wordsx%(maxwords%), wordsy%(maxwords%), wordsvert%(maxwords%), wordshoriz%(maxwords%) 14520REM God I wish this was C right now...typedef struct... 14530tempwordpartfill% = wordpartfill% 14540templetterfill% = letterfill% 14550tempbias% = bias% 14560griddefined% = FALSE 14570changed% = FALSE 14580saved% = TRUE 14590ENDPROC 14600 14610DEF FNfindname(addr%) 14620LOCAL result$ 14630WHILE ?addr% > 31 14640result$ += CHR$(?addr%) 14650addr% += 1 14660ENDWHILE 14670=result$ 14680 14690DEF FNisprinteron 14700LOCAL printeron% 14710printeron% = TRUE 14720bef% = ADVAL(-4) 14730VDU2,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,3 14740TIME = 0 14750REPEAT UNTIL TIME > 100 14760aft% = ADVAL(-4) 14770IF bef% <> aft% THEN printeron% = FALSE 14780=printeron% 14790
� >!RunImage � !WordSearch � �1992 Archimedes World (� by Andrew Ellam 2G� Shell for writing Wimp applications was written by Jason O'Broin. <C� It was published in (and is probably still �) BBC Acorn User. FJ� Interface Manager II module is �1991 SoftWare Interrupt Developments P ZH� Apologies for silly icons inside main directory (they're resources d� you see!). n xA� First half is (mainly) wimp interface - second is main code � �handle% = -1 �� � �error � �ș "Hourglass_On" � �setup ��checkforload �ș "Hourglass_Off" �dummy$ = �action(�) ��finishwimp �� � �� �setup �init alias$="<Word$Dir>" version$="2.52 (12-Nov-92)" "E� q% 100, block% 1000, newblock% 1000, menblk% 1000, okblock% 200 ,$� main_blk% 1000, back_blk% 1000 67� words_sub% 1000, output_sub% 1000, gaps_sub% 1000 @!� text% 100, stateblock% 1000 J$q%="TASK" T8ș "Wimp_Initialise",200,!q%,"Wordsearch" � ,handle% ^$ș "Wimp_ClaimInterface",handle% h#�sprites("<Word$Dir>.!Sprites") r iconh%=�iconbar("!Wordicon") |,info%=�templates("<Word$Dir>.Templates") �"�set_version(info%,3,version$) ��load_menus ��prebuildmenus �quit%=� ��resetmask �mytype% = &040 �mytype$ = "Wordsrch" �mytypeinhex$ = "&040" �dashes% = 1 �� � �� �resetmask �� 0,1,2,3,4,6,7,8,9,17,18 mask%=%10011111110000100000 � &� �prebuildmenus 0-men1y%=0:�build_menu("Wordsearch",men1y%) :men1height%=men1y% D/men2y%=0:�build_menu(" Wordsearch ",men2y%) Nmen2height%=men2y% X1men3y%=0:�build_menu(" Wordsearch ",men3y%) bmen3height%=men3y% l� v �� �load_menus �lm%=�("<Word$Dir>.Menu") �dim%=�#lm% � �#lm% �� menu_data% dim% �/� "LOAD "+"<Word$Dir>.Menu "+�~(menu_data%) �current_menu$="" �� � �� �iconbar(spname$) �!block%=-1 �block%!4=0 �block%!8=0 block%!12=70 block%!16=70 � block%!20=&2102 block%!20=&13182 *� block%!24 (�spname$+1) 4$(block%!24)=spname$ >block%!28=sprite% Hblock%!32=(�spname$+1) R(ș "Wimp_CreateIcon",,block% � icon% \ =icon% f p� �sprites(file$) zsp=�(file$) �dim%=�#sp+16 ��#sp �� sprite% dim% �!sprite%=dim% �sprite%!4=0 �sprite%!8=16 �sprite%!12=16 �)ș "OS_SpriteOp",256+10,sprite%,file$ �� � �� �checkforload �� filename$ �ș "OS_GetEnv" � filename$ 5filename$ = �filename$,�filename$,"RunImage")+10) � �(filename$) > 0 � �loadgrid(filename$) $#�set_version(save%,1,filename$) . �opengrid 8� B� L V� �action(processwindow%) `� result$,newresult$ j� t!block%=mask% ~)ș "Wimp_Poll",mask%,block% � reason% �*ș "Wimp_PollPointer",reason%,,handle% �Ȏ reason% � �G� 0 : � � (processwindow% = �) � result$ <> "Pause" � �imstillalive �� 1 : �reopen �� 2 : �open �� 3 : �close �� 6 α� processwindow%=� � �check_mouse(!block%,block%!4,block%!8,block%!12,block%!16) � newresult$ = �secondaryclick(processwindow%,block%!12,block%!16,block%!8,!block%,block%!4) �E� � (result$ = "Pause" � newresult$ = "") � result$ = newresult$ �*� 7 : � processwindow%=� � �finishdrag �S� 8 : � processwindow%=� � �keypressed(block%!24,!block%,block%!4) � �passonkey �� 9 : �menu_select *� 17,18 : �wimpmessage(processwindow%) � 5� quit% � ( processwindow% � result$ <> "Pause" ) =result$ ( 2� �imstillalive <r� �(�textfromwritable(fitting%,2)) = 25 � dashes% = -1 � � �(�textfromwritable(fitting%,2)) = 0 � dashes% = 1 F�� dashes% = 1 � �set_version(fitting%,2,�textfromwritable(fitting%,2)+"-") � �set_version(fitting%,2,��textfromwritable(fitting%,2),�(�textfromwritable(fitting%,2))-1)) P� Z d� �passonkey n"ș "Wimp_ProcessKey",block%!24 x� � �(� �keypressed(key%,winhnd%,iconhnd%) � Ȏ key% � �%� &0D : �return(winhnd%,iconhnd%) �'� &18F : �uparrow(winhnd%,iconhnd%) �)� &18E : �downarrow(winhnd%,iconhnd%) � �passonkey �� �� � �� �return(winhnd%,iconhnd%) �Ȏ winhnd% � �� newgrid% � iconhnd% = 3 � �checknewgrid �closeonclick(newgrid%) "-� � iconhnd% = 2 � �downarrow(newgrid%,2) ,� 6� newword% : �callnewword @� save% J,� ��textfromwritable(save%,1),":") > 0 � T)�savegrid(�textfromwritable(save%,1)) ^�closeonclick(save%) h� r�protestatname |� �� savetext% �0� ��textfromwritable(savetext%,1),":") > 0 � �/�saveastext(�textfromwritable(savetext%,1)) ��closeonclick(savetext%) �� ��protestatname �� � � remove% �)�remove(�textfromwritable(remove%,0)) �� �� � �� �clearremoveicon �set_version(remove%,0,"") �setcaret(remove%,0) � & 0 � �uparrow(winhnd%,iconhnd%) :?� winhnd% = newgrid% � iconhnd% = 3 � �setcaret(newgrid%,2) D� N X"� �downarrow(winhnd%,iconhnd%) b?� winhnd% = newgrid% � iconhnd% = 2 � �setcaret(newgrid%,3) l� v �!� �setcaret(winhnd%,iconhnd%) �[ș "Wimp_SetCaretPosition",winhnd%,iconhnd%,,,-1,�(�textfromwritable(winhnd%,iconhnd%)) �� � �� �finishdrag �� Icon has been dropped �� x0,y4,but8,win12,icon16 �'ș "Wimp_GetPointerInfo",,newblock% �1newblock%!20=newblock%!12 : � Window handle �/newblock%!24=newblock%!16 : � icon handle �%newblock%!28=!newblock% : � x �%newblock%!32=newblock%!4 : � y �!newblock%=256 newblock%!12=0 1newblock%!16=1 : � Message_DataSave -newblock%!36=750 : � Size of file � drag$ = "norm" � *newblock%!40=mytype% 49$(newblock%+44)=�leafname(�textfromwritable(save%,1)) >� Hnewblock%!40=&FFF R=$(newblock%+44)=�leafname(�textfromwritable(savetext%,1)) \� f&?(newblock%+44+�$(newblock%+44))=0 p&ș "Wimp_SendMessage",17,newblock% zsaveref% = newblock%!8 �� � �� �leafname(pathname$) �� beginning%,letter% �letter% = �(pathname$) �1ȕ �pathname$,letter%,1) <> "." � letter% > 0 �letter% -= 1 �� �=�pathname$,letter%+1) � �"� �wimpmessage(processwindow%) �Ȏ block%!16 � �� 0 : � Message_Quit quit% = � � 2 : � Message_DataSaveAck � processwindow%=� � $:� drag$ = "norm" � �savefromwimp � �saveastextfromwimp .� 8� 3 : � Message_DataLoad B&� � processwindow% � �loadfromwimp L� 5 : � Message_DataOpen V<� � processwindow% � block%!40 = mytype% � �loadfromwimp `� 8 : � Message_PreQuit j-� griddefined% = � � saved% = � � �object t#� &502 : � Help message request ~%ș "Wimp_SendInformation",,block% �� �� � � � �object �� �raiseobjection = � � �block%!12 = block%!8 �%ș "Wimp_SendMessage",19,block%,0 �� �� � �� �raiseobjection �_=�yorn("1 file edited but not saved in Wordsearch Creator. Are you sure you want to Quit?") � �savefromwimp 0� block%!12 <> saveref% � block%!36 = -1 � � #�savegrid(�findname(block%+44)) (.�set_version(save%,1,�findname(block%+44)) 2� < F� �saveastextfromwimp P0� block%!12 <> saveref% � block%!36 = -1 � � Z%�saveastext(�findname(block%+44)) d2�set_version(savetext%,1,�findname(block%+44)) n� x �� �loadfromwimp �e� block%!40 <> mytype% � �ok("I can only load "+mytype$+" files (filetype "+mytypeinhex$+")") : � �� condition% �condition% = � �!block% = 256 �block%!12 = block%!8 �block%!16 = 4 �Iș "Wimp_SendMessage",17,block%,block%!4 : � Send Message_DataLoadAck ҵ� griddefined% � changed% = � � � �yorn("This will delete the grid you have already made. Click OK to load the new grid instead or Cancel to keep the old one.") � condition% = � �2� griddefined% � changed% = � � condition% = � �%� � griddefined% � condition% = � �� condition% = � � �& �loadgrid(�findname(block%+44)) 1 �set_version(save%,1,�findname(block%+44)) �opengrid � "� , 6 � �reopen @*ș "Wimp_RedrawWindow",,block% � flag% Jȕ flag% T"ș "Wimp_BorderWindow",,block% ^*ș "Wimp_GetRectangle",,block% � flag% h� r� | �.� �check_mouse(mx%,my%,but%,hnd%,iconhnd%) �� hnd% = info% � � � Ȏ but% � � � %001 ��slabinicons � Ȏ hnd% � �)� newword% : �newwordclick(iconhnd%) �.� newgrid% : �newgridclick(iconhnd%,but%) �.� options% : �optionsclick(iconhnd%,but%) �+� save% : �saveclick(iconhnd%,but%) �/� savetext% : �savetextclick(iconhnd%,but%) �-� remove% : �removeclick(iconhnd%,but%) �� �slabouticons � %010 � hnd%=-2 � &menux%=mx%-64 0menuy% = men1y% :menheight% = men1height% D0�re_openmenu("Wordsearch",menux%,menheight%) N� X`� hnd% <> options% � hnd% <> newgrid% � hnd% <> save% � hnd% <> savetext% � hnd% <> stats% � bmenux% = mx%-64 lmenuy% = men2y% v+�re_openmenu(" Wordsearch ",menux%,my%) �� �-� Spaces in line above are VERY important �� � � %100 ��slabinicons � Ȏ hnd% � �� -2 : �iconbarclick �)� newword% : �newwordclick(iconhnd%) �.� newgrid% : �newgridclick(iconhnd%,but%) �.� options% : �optionsclick(iconhnd%,but%) �+� save% : �saveclick(iconhnd%,but%) �/� savetext% : �savetextclick(iconhnd%,but%) �-� remove% : �removeclick(iconhnd%,but%) � �slabouticons � &40 : � drag Ȏ hnd% � *'� save% : �saveclick(iconhnd%,but%) 4/� savetext% : �savetextclick(iconhnd%,but%) >� H� R� \ f� �slabinicons p&� hnd% = grid% � hnd% = words% � � z$ș "Wimp_GetPointerInfo",,block% � ș "Wimp_BorderIcon",,block% �� � �� �slabouticons �&� hnd% = grid% � hnd% = words% � � �$ș "Wimp_GetPointerInfo",,block% �block%!8 = 0 � ș "Wimp_BorderIcon",,block% �� � �!� �removeclick(iconhnd%,but%) �� iconhnd% <> 1 � ��set_version(remove%,0,"") �setcaret(remove%,0) )�remove(�textfromwritable(remove%,0)) � $ .� �iconbarclick 8� dummy% B4� griddefined% � �opengrid � dummy%=�opennewgrid L� V `� �newwordclick(iconhnd%) j!� iconhnd% = 1 � �callnewword t� ~ �� �callnewword �� dummy$ �7dummy$=�new_word("I",�textfromwritable(newword%,0)) �� � �� �clearnewwordicon ��set_version(newword%,0,"") ��setcaret(newword%,0) �� � �"� �newgridclick(iconhnd%,but%) �� iconhnd% = 4 � �checknewgrid �slabouticons (� but% = 4 � �closeonclick(newgrid%) � (� 2 <� �checknewgrid F�� griddefined% = � � changed% = � � �new_grid � � �yorn("This will erase the grid you have already made. Click OK to make a new grid, click CANCEL to keep the grid you have already got.") � �new_grid P� Z d"� �optionsclick(iconhnd%,but%) nȎ iconhnd% � x� 1 : bias% = �swap(bias%) �.� 2 : wordpartfill% = �swap(wordpartfill%) �*� 3 : letterfill% = �swap(letterfill%) �*� 5 : background% = �swap(background%) �� 4 : �saveoptions(but%) �� �� � �� �swap(swapee%) �� swapee%=� � =� � =� � �� �saveclick(iconhnd%,but%) �Ȏ iconhnd% � �� 0 � but% = &40 � drag$ = "norm" �dragicon(save%) "� ,� 2 6,� ��textfromwritable(save%,1),":") > 0 � @)�savegrid(�textfromwritable(save%,1)) J(� but% = %100 � �closeonclick(save%) T� ^�protestatname h� r� |� � �#� �savetextclick(iconhnd%,but%) �Ȏ iconhnd% � �� 0 �� but% = &40 � �drag$ = "text" ��dragicon(savetext%) �� �� 2 �0� ��textfromwritable(savetext%,1),":") > 0 � �/�saveastext(�textfromwritable(savetext%,1)) �,� but% = %100 � �closeonclick(savetext%) �� �protestatname � � &� 0 :� �dragicon(winhnd%) D"� Drag save icon out of window N� winbasex%,winbasey% X!newblock%=winhnd% b'ș "Wimp_GetWindowState",,newblock% l*winbasex% = newblock%!4 - newblock%!20 v+winbasey% = newblock%!16 - newblock%!24 �newblock%!4 = 0 �%ș "Wimp_GetIconState",,newblock% �newblock%!4 = 5 �newblock%!8 += winbasex% �newblock%!12 += winbasey% �newblock%!16 += winbasex% �newblock%!20 += winbasey% �newblock%!24 = 0 �newblock%!28 = 0 �Fnewblock%!32 = 99999 : � Can't be bothered to find size of screen. �newblock%!36 = 99999 � ș "Wimp_DragBox",,newblock% �� � �closeonclick(hnd%) �slabouticons !stateblock%=hnd% *)ș "Wimp_GetWindowState",,stateblock% 4&ș "Wimp_CloseWindow",,stateblock% >� H R � �create_menu(title$,x%,y%) \ menuy%=y% f�build_menu(title$,menuy%) pmenux%=x%-64 z menuy%=y% �,ș "Wimp_CreateMenu",,blk%,menux%,menuy% �� � �"� �create_icon_menu(title$,x%) �menuy%=0 ��build_menu(title$,menuy%) �menux%=x%-64 �,ș "Wimp_CreateMenu",,blk%,menux%,menuy% �� � �#� �build_menu(title$,� height%) �A� offset%,i%,menuItems%,dots%,wimpflags,flags,ptr%,name$,ptr$ �)offset%=�find_menu(title$,menu_data%) -� offset%=� � � 42,"Can't find menu data" +blk$=�get_menu_item(menu_data%,offset%) blk%=�(blk$) $$blk%=�title$,12) . blk%?12=7 8 blk%?13=2 B blk%?14=7 L blk%?15=0 Vblk%!16=200 : � Width `blk%!20=44 j blk%!24=0 t i%=28 ~menuItems%=0 �dots%=0 �:ȕ menu_data%?offset%<>�"~" � menu_data%?offset%<>�"^" ��menu_item �L� �name$,1)="@" � name$=�name$,�name$-1):ptr$=�build_submenu(name$,pos%) �� (flags � 4)=4 � �instr%=�ptr$,",") �#blk%!(i%+12)=�(�ptr$,instr%-1)) �ptr$=�ptr$,instr%+1) �instr%=�ptr$,",") �#blk%!(i%+16)=�(�ptr$,instr%-1)) �ptr$=�ptr$,instr%+1) �blk%!(i%+20)=�(ptr$) wimpflags=wimpflags � 2^8 ptr%=-1 ($(blk%!(i%+12))=�name$,blk%!(i%+20)) � ($(blk%+i%+12)=�name$,12) 2ptr%=�(ptr$) <� Fblk%!i%=flags Pblk%!(i%+4)=ptr% Zblk%!(i%+8)=wimpflags di%=i%+24 nmenuItems%+=1 x� �)height%=96+(menuItems%*44)+(dots%*24) �current_menu$=�$blk%,12) �� � �� �menu_item �wimpflags=&7000021 �flags=0 � ptr$="-1" �func$="" �,name$=�get_menu_item(menu_data%,offset%) �P� menu_data%?offset%=�"!" offset%+=1:ptr$=�get_menu_item(menu_data%,offset%) �X� menu_data%?offset%=�"{" offset%+=1:wimpflags=�(�get_menu_item(menu_data%,offset%)) �Q� menu_data%?offset%=�"\" offset%+=1:func$=�get_menu_item(menu_data%,offset%) I� menu_data%?offset%=�"~" � menu_data%?offset%=�"^" flags=flags � &80 .� �name$,1)="}" � flags+=1:name$=�name$,2) .� �name$,1)="#" � flags+=4:name$=�name$,2) ">� �name$,1)="}" � flags+=2:name$=�name$,�name$-1):dots%+=1 ,� 6 @!� �build_submenu(title$,pos%) J� blk$,blk% T�build_menu(title$,pos%) ^ =blk$ h r� �menu_select | ș "Wimp_GetPointerInfo",,q% � but%=q%!8 �depth%=0 ��decode_menu(current_menu$) �� (but% � 1)=1 � �-�re_openmenu(current_menu$,menux%,menuy%) �� �current_menu$="" �� �� � �&� �re_openmenu(title$,menx%,meny%) �)offset%=�find_menu(title$,menu_data%) �.blk%=�(�get_menu_item(menu_data%,offset%)) *ș "Wimp_CreateMenu",,blk%,menx%,meny% current_menu$=title$ � & 0� �decode_menu(title$) :� men_loop%,func$ D)offset%=�find_menu(title$,menu_data%) N.blk%=�(�get_menu_item(menu_data%,offset%)) Xmen_loop%=0 bȕ men_loop%<=block%!depth% ldots%=0 v�menu_item �men_loop%+=1 �� �� block%!depth%>-1 � �� �name$,1)="@" � �name$=�name$,�name$-1) � depth%+=4 ��decode_menu(name$) �� �!� func$<>"" � a=�("FN"+func$) �� �� � �� �templates(file$) p� Q% 2048, P% 2048, O% 2048, N% 4096, M% 2048, L% 2048, K% 2048, J% 2048, I% 2048, H% 2048, G% 2048, F% 2048 maxws%=&900 �� indir% maxws%, indir2% maxws%, indir3% maxws%, indir4% maxws%, indir5% maxws%, indir6% maxws%, indir7% maxws%, indir8% maxws%, indir9% maxws%, indir10% maxws%, indir11% maxws%, indir12% maxws% !ș "Wimp_OpenTemplate",,file$ *?ș "Wimp_LoadTemplate",,Q%,indir%,indir%+maxws%,-1,"info",0 4Aș "Wimp_LoadTemplate",,P%,indir2%,indir2%+maxws%,-1,"grid",0 >Bș "Wimp_LoadTemplate",,O%,indir3%,indir3%+maxws%,-1,"words",0 HDș "Wimp_LoadTemplate",,N%,indir4%,indir4%+maxws%,-1,"options",0 RDș "Wimp_LoadTemplate",,M%,indir5%,indir5%+maxws%,-1,"newgrid",0 \Aș "Wimp_LoadTemplate",,L%,indir6%,indir6%+maxws%,-1,"save",0 fDș "Wimp_LoadTemplate",,K%,indir7%,indir7%+maxws%,-1,"newword",0 pDș "Wimp_LoadTemplate",,J%,indir8%,indir8%+maxws%,-1,"fitting",0 zAș "Wimp_LoadTemplate",,I%,indir9%,indir9%+maxws%,-1,"auto",0 �Gș "Wimp_LoadTemplate",,H%,indir10%,indir10%+maxws%,-1,"savetext",0 �Dș "Wimp_LoadTemplate",,G%,indir11%,indir11%+maxws%,-1,"stats",0 �Eș "Wimp_LoadTemplate",,F%,indir12%,indir12%+maxws%,-1,"remove",0 �&ș "Wimp_CreateWindow",,Q% � info% �&ș "Wimp_CreateWindow",,P% � grid% �'ș "Wimp_CreateWindow",,O% � words% �)ș "Wimp_CreateWindow",,N% � options% �)ș "Wimp_CreateWindow",,M% � newgrid% �&ș "Wimp_CreateWindow",,L% � save% �)ș "Wimp_CreateWindow",,K% � newword% �)ș "Wimp_CreateWindow",,J% � fitting% �&ș "Wimp_CreateWindow",,I% � auto% �*ș "Wimp_CreateWindow",,H% � savetext% 'ș "Wimp_CreateWindow",,G% � stats% (ș "Wimp_CreateWindow",,F% � remove% ș "Wimp_CloseTemplate" $�setallicons . =info% 8 B� �setallicons L�setoptionsicons V$�set_version(save%,1,"Wordfile") `(�set_version(savetext%,1,"Textfile") j!�set_version(newgrid%,2,"20") t!�set_version(newgrid%,3,"20") ~� � �� �set_version(pt%,H%,ver$) �!q%=pt% �q%!4=H% �ș "Wimp_GetIconState",,q% �$q%!28=ver$ � q%!8=0 �q%!12=0 �Ȗ �ș "Wimp_SetIconState",,q% �� � � �finishwimp #ș "Wimp_CloseDown",handle%,!q% &ș "Wimp_ReleaseInterface",handle% �# 0 (ș "Hourglass_Smash" 2� <� F P� �yorn(text$) Z+� Report message - return true or false d�slabouticons n � answer% x!okblock%=224 �$(okblock%+4)=text$+�0 �?ș "Wimp_ReportError",okblock%,%111,"Wordsearch" � ,answer% �� answer%=1 � �=� �� �=� �� � �� �ok(text$) �� Report message ��slabouticons �!okblock%=224 �$(okblock%+4)=text$+�0 2ș "Wimp_ReportError",okblock%,%1,"Wordsearch" � "� �error , � � � 6� Report REAL error @� dummy$,fred% J9� handle% > -1 � ș "Wimp_DragBox",,0 : �slabouticons T�#0 ^� � �error h�� �yorn("(Internal error code "+�(�)+","+�(�)+") "+�$+" Click OK to continue or Cancel to Quit.") � dummy$=�action(�) � fred%=�fin r� | �� 380 by 768 �� �opengrid �(�openanywindow(grid%,50,200,430,968) �� � �� 1104 BY 860 �� �openwords �,�openanywindow(words%,460,200,1564,1060) �=0 � �� 1062 by 368 �� �openoptions �-�openanywindow(options%,100,200,1162,568) =0 � �setoptionsicons &#� bias% � �setradio(options%,1) 0+� wordpartfill% � �setradio(options%,2) :)� letterfill% � �setradio(options%,3) D)� background% � �setradio(options%,5) N� X b� 438 by 200 l� �opennewword v,�openanywindow(newword%,200,200,638,400) �=0 � �� 486 by 300 �� �opennewgrid �-�openanywindow(newgrid%,600,200,1086,500) �=0 � �� 316 by 184 �� �opensave �)�openanywindow(save%,500,500,816,684) �=0 � �� 438 by 200 � �openremove +�openanywindow(remove%,500,500,938,700) =0 *� 620 by 220 4� �openfitting >$�set_version(fitting%,0,"Pause") H-�openanywindow(fitting%,500,130,1120,350) R� \ f8� 614 by 148 - Actually it's now smaller than that. p� �openauto z*�openanywindow(auto%,500,400,1114,548) �� � �3� �openanywindow(windowhandle%,x0%,y0%,x1%,y1%) �!newblock%=windowhandle% �newblock%!4=x0% �newblock%!8=y0% �newblock%!12=x1% �newblock%!16=y1% �newblock%!20=0 �newblock%!24=0 �newblock%!28=-1 �#ș "Wimp_OpenWindow",,newblock% �� � �close !ș "Wimp_CloseWindow",,block% $� . 8� �open B ș "Wimp_OpenWindow",,block% L� V ` � �get_menu_item(db%,� off%) j � st$ t"ȕ db%?off%<>10 � db%?off%<>13 ~st$+=�(db%?off%) �off%+=1 �� �off%+=1 �=st$ � �� �find_menu(name$,data%) � � fi$ �name$="^"+name$ � offset%=0 �� �%fi$=�get_menu_item(data%,offset%) �� fi$=name$ � fi$="~" � fi$="~" � =� =offset% � �flip (!main_blk%!28=main_blk%!28 � 1 2� < F� �menuauto P �auto Z=0 d n,� �textfromwritable(windowhnd%,iconhnd%) x � Read text in writable icon �� thetext$ �!text%=windowhnd% �text%!4=iconhnd% �!ș "Wimp_GetIconState",,text% �=$text%!28 � �� �finfrommenu ��finish ��updatequalities �=0 � �!� �setradio(winhnd%,iconhnd%) �!q%=winhnd% q%!4=iconhnd% ș "Wimp_GetIconState",,q% q%!8 = 1<<21 "q%!12 = 1<<21 ,ș "Wimp_SetIconState",,q% 6� @ J � �fin T%� griddefined% = � � saved% = � � ^'� �raiseobjection = � � �finishwimp h� r�finishwimp |� �=0 � �� �print � �print �=0 � �D� �secondaryclick(windowhnd%,returnedhnd%,iconhnd%,but%,mx%,my%) �� condition$,result$ � Ȏ but% � � � %010 �menux% = mx%-64 �menuy% = men3y% �menheight% = men3height% v� returnedhnd% = -2 � �re_openmenu(" Wordsearch ",menux%,menheight%) � �re_openmenu(" Wordsearch ",menux%,my%) � %100,%001 +� returnedhnd% = -2 � �iconbarclick:="" &<� returnedhnd% <> auto% � returnedhnd% <> fitting% � ="" 0�slabinicons :7condition$ = �textfromwritable(windowhnd%,iconhnd%) DȎ iconhnd% � N� 0 Xresult$ = condition$ b �togglecondition(condition$) l� 1 vK� returnedhnd% = fitting% � result$ = "Cancel" � result$ = "Cancelauto" �� ��slabouticons �� �=result$ � �"� �togglecondition(condition$) �K� condition$ = "Pause" � condition$ = "Continue" � condition$ = "Pause" �)�set_version(windowhnd%,0,condition$) �� � �%� �settitlebar(hnd%,titlestring$) �!block% = hnd% �#ș "Wimp_GetWindowInfo",,block% !$$(block%!76) = titlestring$ + �0 !� ! ! � �help !*3� Start Universal Application Help as a subtask !4ș "Hourglass_On" !>1$(newblock%) = "Obey <Word$Dir>.LoadHelp" +�0 !H!ș "Wimp_StartTask",newblock% !Rș "Hourglass_Off" !\=0 !f !p� �protestatname !z�slabouticons !�:�ok("Drag the file icon into a Filer window to save.") !�� !� !�� �updatequalities !�-�set_version(stats%,2,�wordqualitystring) !�-�set_version(stats%,3,�fillqualitystring) !�� !� !�� �clearqualities !��set_version(stats%,2,"") !��set_version(stats%,3,"") !�� !� "� �clearfillquality "�set_version(stats%,3,"") "possiblefills% = 0 "$actualfills = 0 ".� "8 "B� �cleargaps "L�checkforholes "V�updategrid(0) "`�clearfillquality "j=0 "t "~K�********************************************************************** "�K�********************* ************************** "�K�********************* Wordsearch code ************************** "�K�********************* ************************** "�K�********************************************************************** "� "�� �setbackgroundmask "�!mask% = %10011111100110110000 "�� "� "�� >Word3 "�� Version: 3 "��� Some of this, particularly word-fitting section, was written some time ago. Had to be altered somewhat. Apologies for messyness # # � �remove(removeword$) #� rnum%,letter% #� �(removeword$) = 0 � � #(9rnum% = �searchthroughwords(�upper_case(removeword$)) #2+� rnum% = 999 � �ok("Word not found"):� #<ș "Hourglass_On" #F�deleteword(rnum%) #P�shiftwordsup(rnum%) #Z�checkforholes #d�updatewords #n�updategrid(0) #x�updatequalities #��clearfillquality #��clearremoveicon #�ș "Hourglass_Off" #�� #� #�� �deleteword(rnum%) #�� x%,y% #�$� letter% = 1 � �(words$(rnum%)) #�4x% = wordsx%(rnum%)+(letter%*wordshoriz%(rnum%)) #�3y% = wordsy%(rnum%)+(letter%*wordsvert%(rnum%)) #�numbers%(x%,y%) -= 1 #�+� numbers%(x%,y%) = 0 � fitquality -= 1 #� � letter% $� $ $&� �searchthroughwords(searchword$) $"� thisword%,number% $,number% = 999 $6&� thisword% = 1 � number_of_words% $@Z� words$(thisword%) = searchword$ � number% = thisword% : thisword% = number_of_words% $J� thisword% $T=number% $^ $h� �shiftwordsup(number%) $r� thisword% $|.� thisword% = number% � number_of_words%-1 $�+words$(thisword%) = words$(thisword%+1) $�-wordsx%(thisword%) = wordsx%(thisword%+1) $�-wordsy%(thisword%) = wordsy%(thisword%+1) $�3wordsvert%(thisword%) = wordsvert%(thisword%+1) $�5wordshoriz%(thisword%) = wordshoriz%(thisword%+1) $�� thisword% $�!words$(number_of_words%) = "" $�number_of_words% -= 1 $�� $� $�� �checkforholes $�� x%,y% $�� x% = 1 � xsize%+1 %� y% = 1 � ysize%+1 %-� numbers%(x%,y%) = 0 � grid$(x%,y%) = "" %� y% %&� x% %0� %: %D� �auto %N� cancelled% %Xcancelled% = � %b� background% = � � %l �openauto %vbut% = %100 %�� %�ș "Hourglass_On" %�� %�failcount% = 0 %�+dictionary = �("<Word$Dir>.Dictionary") %�� %�F� background% � �new_word("D","dummy") = "Cancel" � cancelled% = � %��updatequalities %�D� failcount% = 5 � number_of_words% = maxwords% � cancelled% = � %��#dictionary %�@� (background% � cancelled% = �) � background% = � � �finish %�� background% � %��closeonclick(auto%) &� &ș "Hourglass_Off" &� & � &* &4$� �new_word(source$,passedword$) &>I� Place new word on grid "I" = Input new word "D" = Use Dictionary &H�� maxlength%,newword$,vert%,horiz%,x%,y%,priority%,decidedx%,decidedy%,decidedvert%,decidedhoriz%,ran%,letter%,xstart%,ystart% &RT� number_of_words% = maxwords% � �ok("Sorry, no more words can be fitted") : ="" &\priority% = -1 &f ran%=�(2) &p$maxlength% = �max(xsize%,ysize%) &z� source$ = "I" � &�<newword$ = �stripleadingspaces(�upper_case(passedword$)) &��clearnewwordicon &�� �(newword$) = 0 � ="" &�#� newword$ = �upper_case(�dict) &�� &�4� xsize% > 1 � xstart% = �(xsize%) � xstart% = 1 &�4� ysize% > 1 � ystart% = �(ysize%) � ystart% = 1 &�� background% = � � &��setbackgroundmask &��slabouticons &�3�settitlebar(fitting%,"Fitting word "+newword$) &��openfitting &�� 'ș "Hourglass_On" '� '� vert% = -1 � 1 '$� horiz% = -1 � 1 '.%� � ( horiz% = 0 � vert% = 0 ) � '80� Unfortunalely FOR....NEXT won't do this... 'Bx% = xstart% 'L� 'V� background% � '`Ȏ �action(fitting%) � 'j6� "Cancel" :�closeonclick(fitting%):�resetmask:="" 't?� "Cancelauto":�closeonclick(fitting%):�resetmask:="Cancel" '~� '�� '�y% = ystart% '�� '�:thispriority% = �priority(x%,y%,vert%,horiz%,newword$) '��� (bias% � thispriority% > priority%) � ((� bias%) � ran%=1 � thispriority% > priority%) � ((� bias%) � ran%=2 � thispriority% >= priority%) � '�priority% = thispriority% '�decidedvert% = vert% '�decidedhoriz% = horiz% '�decidedx% = x% '�decidedy% = y% '�P� priority% > -1 � changed% = � � y%=ystart%-1:x%=xstart%-1:horiz%=1:vert%=1 '�� ( &� y% > 0 � y% -= 1 � y% = ysize%+1 ( � y% = ystart% (&� x% > 0 � x% -= 1 � x% = xsize%+1 (� x% = xstart% ((� (2� horiz% (<� vert% (F� background% = � � (P�closeonclick(fitting%) (Z�resetmask (d� (nș "Hourglass_Off" (x� (�� source$ = "I" � (�:� priority% = -1 � �ok("Sorry, word won't fit!") : ="" (�� (�� priority% = -1 � (�failcount% += 1 (�="" (�� (�failcount% = 0 (�� (�� (�number_of_words%+=1 (�'fitquality += �(newword$)-priority% (�� letter% = 1 � �(newword$) )dgrid$(decidedx%+(letter%*decidedhoriz%),decidedy%+(letter%*decidedvert%)) = �newword$,letter%,1) )Unumbers%(decidedx%+(letter%*decidedhoriz%),decidedy%+(letter%*decidedvert%)) += 1 ) � letter% )"'words$(number_of_words%) = newword$ ),)wordsx%(number_of_words%) = decidedx% )6)wordsy%(number_of_words%) = decidedy% )@/wordsvert%(number_of_words%) = decidedvert% )J1wordshoriz%(number_of_words%) = decidedhoriz% )T1longestword% = �max(longestword%,�(newword$)) )^changed% = � )hsaved% = � )r�updatewords )|�updategrid(0) )��updatequalities )�="" )� )�,� �priority(x%,y%,vert%,horiz%,newword$) )�$� check priority of word placing )�� priority%,letter% )�+� Check word is within grid boundaries. )̀�(x%+(horiz%*�(newword$))>xsize%)�(x%+(horiz%*�(newword$))<=0)�(y%+(vert%*�(newword$))>ysize%)�(y%+(vert%*�(newword$))<=0) � )�= -1 )�� )�priority% = -1 )�Q� Check if each space is empty, different or the same as letters in the word. )�� letter% = 1 � �(newword$) *6Ȏ grid$(x%+(horiz%*letter%),y%+(vert%*letter%)) � *M� �newword$,letter%,1) : � priority% < 0 � priority% = 1 � priority% += 1 *&� "" : � priority% < 0 priority%=0 *&. : priority% = -1 : letter% = �(newword$) *0� *: � letter% *D=� Next line takes care of the same word being used twice. *N� priority% = �(newword$) � *X= -1 *b� *l=priority% *v *�� �new_grid *�� prepare new grid *�U� �(�textfromwritable(newgrid%,2)) < 1 � �(�textfromwritable(newgrid%,3)) < 1 � � *��� �(�(�textfromwritable(newgrid%,2))) > 20 � �(�(�textfromwritable(newgrid%,2))) < 0 � �(�(�textfromwritable(newgrid%,3))) > 20� �(�(�textfromwritable(newgrid%,3))) < 0 � � 223, "Size must be 20 or less" *�ș "Hourglass_On" *��cleargrid *�.xsize%=�(�(�textfromwritable(newgrid%,2))) *�.ysize%=�(�(�textfromwritable(newgrid%,3))) *�� x%,y%,i%,thisword% *�� thisword% = 1 � maxwords% *�words$(thisword%) = "" *�� thisword% *�number_of_words% = 0 +longestword% = 0 +fitquality = 0 +possiblefills% = 0 + actualfills = 0 +*� x%=1 � xsize% +4� y%=1 � ysize% +>grid$(x%,y%) = "" +H� y% +R� x% +\griddefined% = � +fchanged% = � +psaved% = � +z�updategrid(0) +��updatewords +� �opengrid +��clearqualities +�ș "Hourglass_Off" +�� +� +�� �print +�� print grid +�!� line%,word%,s1$,s2$,online% +�ș "Hourglass_On" +�� +�online% = �isprinteron +�X� online% = � � � � �yorn("Printer is offline. Try again?") � ș "Hourglass_Off" : � ,� online% = � ,� 2 ,� ' ,$� line% = 1 � ysize% ,.� �gridtostring(line%) ,8� line% ,B� ' ,L'� word% = 1 � �(number_of_words%/3) ,V{�words$(word%);�(25-�(words$(word%)));words$(word%+1);�(25-�(words$(word%+1)));words$(word%+2);�(25-�(words$(word%+2))) ,`� word% ,j� ' ,t:s1$="Word fitting quality is "+�wordqualitystring+":1" ,~8s2$="Gap filling quality is "+�fillqualitystring+"%" ,� � s1$ ,� � s2$ ,�� 3 ,�ș "Hourglass_Off" ,�� ,� ,�� �saveastext(filename$) ,�� Bit similar to above! ,�R� �doesfileexist(filename$) � � � �yorn("File already exists. Overwrite?") � � ,�� line%,word% ,�O� �doesfileexist(filename$) � ș "OS_File",&06,filename$ :� Delete old file ,�7ș "OS_File",&0B,filename$,&FFF :� Create new one - textfile = �(filename$) - � line% = 1 � ysize% -#�#textfile,�gridtostring(line%) -� line% -(�#textfile," " : � CR -2"� word% = 1 � number_of_words% -<�#textfile,words$(word%) -F� word% -P� changed% � -Z�#textfile," " : � CR -dA�#textfile,"Word fitting quality is "+�wordqualitystring+":1" -n?�#textfile,"Gap filling quality is "+�fillqualitystring+"%" -x� -��#textfile -�� -� -�� �gridtostring(line%) -�-� Return specified line of grid as string -�� string$,x% -�� x% = 1 � xsize% -�B� grid$(x%,line%)="" � string$+="-" � string$+=grid$(x%,line%) -�� x% -�=string$ -� -�� �saveoptions(but%) -�� optionsfile .)optionsfile = �("<Word$Dir>.Options") .=�#optionsfile,bias%,letterfill%,wordpartfill%,background% .�# optionsfile ."(� but% = 4 � �closeonclick(options%) .,� .6 .@��loadoptions .J� optionsfile .T)optionsfile = �("<Word$Dir>.Options") .^=�#optionsfile,bias%,letterfill%,wordpartfill%,background% .h�# optionsfile .r� .| .�� �savegrid(path$) .�� Save grid .�N� �doesfileexist(path$) � � � �yorn("File already exists. Overwrite?") � � .�� file,x%,y%,word% .�file = �(path$) .�l�#file,check$,xsize%,ysize%,number_of_words%,longestword%,fitquality,possiblefills%,actualfills,changed% .�� x% = 1 � xsize% .�� y% = 1 � ysize% .��#file,grid$(x%,y%) .��#file,numbers%(x%,y%) .�� y% .�� x% .�"� word% = 1 � number_of_words% /�#file,words$(word%) /�#file,wordsx%(word%) /�#file,wordsy%(word%) /&�#file,wordsvert%(word%) /0�#file,wordshoriz%(word%) /:� word% /D �#file /N$newblock% = path$ /X&ș "OS_File",&12,newblock%,mytype% /b"� 34 IS A " AND &12 IS SETTYPE /lsaved% = � /v� /� /�� �doesfileexist(filename$) /�� type,load,exec,len,att /�8ș "OS_File",&05,filename$ � type,,load,exec,len,att /�� type = 0 � /�=� /�� /�=� /�� /� /�� �loadgrid(filename$) /�� Load new grid /�!� file,x%,y%,word%,thischeck$ 0file = �(filename$) 0p�#file,thischeck$,xsize%,ysize%,number_of_words%,longestword%,fitquality,possiblefills%,actualfills,changed% 0m� thischeck$ <> check$ � �ok("This file is incompatible with this version of the wordsearch creator") : � 0 � x% = 1 � xsize% 0*� y% = 1 � ysize% 04�#file,grid$(x%,y%) 0>�#file,numbers%(x%,y%) 0H� y% 0R� x% 0\"� word% = 1 � number_of_words% 0f�#file,words$(word%) 0p�#file,wordsx%(word%) 0z�#file,wordsy%(word%) 0��#file,wordsvert%(word%) 0��#file,wordshoriz%(word%) 0�� word% 0��# file 0��updatewords 0��updategrid(0) 0�7� changed% = � � �updatequalities � �clearqualities 0�griddefined% = � 0�saved% = � 0�� 0� 0� � �finish 0�"� fill in empty spaces in grid 1S� x%,y%,horiz%,vert%,thislength%,decidedx%,decidedy%,decidedvert%,decidedhoriz% 1� background% = � � 1�setbackgroundmask 1$.�settitlebar(fitting%,"Filling in spaces") 1.�openfitting 18but% = %100 1B� 1Lș "Hourglass_On" 1V� 1`� x% = 1 � xsize% 1j� y% = 1 � ysize% 1tN� background% � � �action(fitting%) = "Cancel" � �closeonclick(fitting%):� 1~� grid$(x%,y%) = "" � 1�highestlength% = 0 1�� horiz% = 1 � -1 � -1 1�� vert% = 1 � -1 � -1 1�_� background% � � �action(fitting%) = "Cancel" � �closeonclick(fitting%):�updatequalities:� 1�"� �( horiz% = 0 � vert% = 0) � 1�thislength% = 1 1��ȕ grid$(x%+(horiz%*thislength%),y%+(vert%*thislength%))="" � x%+(horiz%*thislength%) > 0 � x%+(horiz%*thislength%) <= xsize% � y%+(vert%*thislength%) > 0 � y%+(vert%*thislength%) <= ysize% � thislength% < longestword% 1�$� thislength% > highestlength% � 1� highestlength% = thislength% 1�decidedvert% = vert% 1�decidedhoriz% = horiz% 1�� 2 thislength% += 1 2 � 2� 2� vert% 2(� horiz% 220� Try all directions from same point then... 2<�� wordpartfill% � highestlength%>1 � number_of_words% > 1 � �wordpartfill(x%,y%,decidedvert%,decidedhoriz%,highestlength%) � � letterfill% � number_of_words% > 0 � �letterfill(x%,y%) � �anyoldletter(x%,y%) 2F� 2P� y% 2Z� x% 2d� background% = � � 2n�closeonclick(fitting%) 2x�resetmask 2�� 2�ș "Hourglass_Off" 2�� 2��updatequalities 2�� 2� 2�.��wordpartfill(x%,y%,vert%,horiz%,length%) 2�C� Pick section from word already used for set of holes in grid. 2�2� ranword%,letter%,ranletter%,place%,filltype% 2�filltype% = �(2) 2�� 2�J� number_of_words% > 1 � ranword% = �(number_of_words%) � ranword% = 1 2�&� �(words$(ranword%))-1 >= length% 3'ranletter% = �(�(words$(ranword%))) 3place% = 0 3� letter% = 0 � length% 3"� letter% <> ranletter% � 3,Ȏ filltype% � 36� 1 3@Ngrid$(x%+(horiz%*place%),y%+(vert%*place%)) = �words$(ranword%),letter%,1) 3J� 2 3Tjgrid$(x%+(horiz%*place%),y%+(vert%*place%)) = �words$(ranword%),�(words$(ranword%))-length%+letter%,1) 3^� 3hplace% += 1 3r� 3| � letter% 3�possiblefills% += length% 3�actualfills += length% 3�changed% = � 3�saved% = � 3��updategrid(0) 3�� 3� 3�� �letterfill(x%,y%) 3�@� Pick letter already used in word for single space in grid. 3�� chosenword$,chosenletter$ 3�`� number_of_words% = 1 � chosenword$ = words$(1) � chosenword$ = words$(�(number_of_words%)) 3�8chosenletter$ = �chosenword$,�(�(�(chosenword$))),1) 3� grid$(x%,y%) = chosenletter$ 4possiblefills% += 1 4actualfills += 0.5 4changed% = � 4&saved% = � 40�updategrid(y%) 4:� 4D 4N� �anyoldletter(x%,y%) 4X&� Pick any letter for single space 4b� character$ 4lcharacter$ = �(�(24)+65) 4vgrid$(x%,y%) = character$ 4�changed% = � 4�saved% = � 4�possiblefills% += 1 4��updategrid(y%) 4�� 4� 4�� �cleargrid 4�(� Clear all icons in the grid window 4�� y% 4�� y% = 1 � maxgridsize% 4��set_version(grid%,y%," ") 4�� y% 4�� 5 5� �updategrid(line%) 5� display grid 5 � line% = 0 � 5*� y% 54� y% = 1 � ysize% 5>G�set_version(grid%,�((maxgridsize%-ysize%)/2)+y%,�gridtostring(y%)) 5H� y% 5R� 5\M�set_version(grid%,�((maxgridsize%-ysize%)/2)+line%,�gridtostring(line%)) 5f� 5p� 5z 5�� �wordquality 5�#=�fix(2,fitquality/Ǝ�words$()) 5� 5�� �fillquality 5�(=�((actualfills/possiblefills%)*100) 5� 5�� �wordqualitystring 5�� number_of_words% > 0 � 5�=��(�wordquality),4) 5�� 5�="" 5�� 5� 6� �fillqualitystring 6� possiblefills% > 0 � 6=�(�fillquality) 6$� 6.="" 68� 6B 6L� �updatewords 6V� update list of words 6`� word% 6j� word% = 1 � maxwords% 6t.�set_version(words%,word%-1,words$(word%)) 6~� word% 6�� 6� 6�� �dict 6�� Pick word from dictionary 6�� letter$,word$ 6�� 6�)�#dictionary = �((�#dictionary )+1)-1 6�� 6�!�#dictionary = �#dictionary-2 6�)� �(�#dictionary) = �(10) : � Newline 6�� 6�letter$ = �(�#dictionary) 7 word$ += letter$ 7 � letter$ = �(10) 7 word$ = �word$,1,�(word$)-1) 7� �(word$) <= maxgridsize% 7( =word$ 72 7<� �max(a%,b%) 7F� a%>b% � =a% � =b% 7P 7Z� �fix(dp%,num) 7d=�(num*(10^dp%))/(10^dp%) 7n 7x� �upper_case(word$) 7� � puts word$ into upper case 7�� converted$,letter% 7�� letter% = 1 � �(word$) 7�!� �(�word$,letter%,1)) > 96 � 7�,converted$ += �(�(�word$,letter%,1))-32) 7�� 7�#converted$ += �word$,letter%,1) 7�� 7� � letter% 7�=converted$ 7� 7� � �stripleadingspaces(word$) 7�ȕ �word$,1) = " " 8word$ = �word$,2) 8� 8ȕ �word$,1) = " " 8" word$ = �word$,1,�(word$)-1) 8,� 86 =word$ 8@ 8J� �init 8T� i% 8^check$ = "@*&^!#��" 8h\� following line sets maximum size of grids. Can be changed to anything (within reason). 8rmaxgridsize%=20 8|I� following line sets maximum number of words. Again, can be changed. 8�1� MUST BE DIVISABLE BE 3 (FOR PRINT ROUNTINE) 8�maxwords%=60 8�quit%=0 8��loadoptions 8��� grid$(maxgridsize%+1,maxgridsize%+1), numbers%(maxgridsize%+1,maxgridsize%+1), words$(maxwords%), wordsx%(maxwords%), wordsy%(maxwords%), wordsvert%(maxwords%), wordshoriz%(maxwords%) 8�9� God I wish this was C right now...typedef struct... 8�%tempwordpartfill% = wordpartfill% 8�!templetterfill% = letterfill% 8�tempbias% = bias% 8�griddefined% = � 8�changed% = � 8�saved% = � 8�� 9 9� �findname(addr%) 9 � result$ 9&ȕ ?addr% > 31 90result$ += �(?addr%) 9:addr% += 1 9D� 9N=result$ 9X 9b� �isprinteron 9l� printeron% 9vprinteron% = � 9�bef% = �(-4) 9�(�2,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,3 9� � = 0 9�� � � > 100 9�aft% = �(-4) 9�#� bef% <> aft% � printeron% = � 9�=printeron% 9� �
00000000 0d 00 0a 10 f4 20 3e 21 52 75 6e 49 6d 61 67 65 |..... >!RunImage| 00000010 0d 00 14 11 f4 20 21 57 6f 72 64 53 65 61 72 63 |..... !WordSearc| 00000020 68 0d 00 1e 1c f4 20 a9 31 39 39 32 20 41 72 63 |h..... .1992 Arc| 00000030 68 69 6d 65 64 65 73 20 57 6f 72 6c 64 0d 00 28 |himedes World..(| 00000040 15 f4 20 62 79 20 41 6e 64 72 65 77 20 45 6c 6c |.. by Andrew Ell| 00000050 61 6d 0d 00 32 47 f4 20 53 68 65 6c 6c 20 66 6f |am..2G. Shell fo| 00000060 72 20 77 72 69 74 69 6e 67 20 57 69 6d 70 20 61 |r writing Wimp a| 00000070 70 70 6c 69 63 61 74 69 6f 6e 73 20 77 61 73 20 |pplications was | 00000080 77 72 69 74 74 65 6e 20 62 79 20 4a 61 73 6f 6e |written by Jason| 00000090 20 4f 27 42 72 6f 69 6e 2e 0d 00 3c 43 f4 20 49 | O'Broin...<C. I| 000000a0 74 20 77 61 73 20 70 75 62 6c 69 73 68 65 64 20 |t was published | 000000b0 69 6e 20 28 61 6e 64 20 69 73 20 70 72 6f 62 61 |in (and is proba| 000000c0 62 6c 79 20 73 74 69 6c 6c 20 a9 29 20 42 42 43 |bly still .) BBC| 000000d0 20 41 63 6f 72 6e 20 55 73 65 72 2e 0d 00 46 4a | Acorn User...FJ| 000000e0 f4 20 49 6e 74 65 72 66 61 63 65 20 4d 61 6e 61 |. Interface Mana| 000000f0 67 65 72 20 49 49 20 6d 6f 64 75 6c 65 20 69 73 |ger II module is| 00000100 20 a9 31 39 39 31 20 53 6f 66 74 57 61 72 65 20 | .1991 SoftWare | 00000110 49 6e 74 65 72 72 75 70 74 20 44 65 76 65 6c 6f |Interrupt Develo| 00000120 70 6d 65 6e 74 73 0d 00 50 04 0d 00 5a 48 f4 20 |pments..P...ZH. | 00000130 41 70 6f 6c 6f 67 69 65 73 20 66 6f 72 20 73 69 |Apologies for si| 00000140 6c 6c 79 20 69 63 6f 6e 73 20 69 6e 73 69 64 65 |lly icons inside| 00000150 20 6d 61 69 6e 20 64 69 72 65 63 74 6f 72 79 20 | main directory | 00000160 28 74 68 65 79 27 72 65 20 72 65 73 6f 75 72 63 |(they're resourc| 00000170 65 73 0d 00 64 10 f4 20 79 6f 75 20 73 65 65 21 |es..d.. you see!| 00000180 29 2e 0d 00 6e 04 0d 00 78 41 f4 20 46 69 72 73 |)...n...xA. Firs| 00000190 74 20 68 61 6c 66 20 69 73 20 28 6d 61 69 6e 6c |t half is (mainl| 000001a0 79 29 20 77 69 6d 70 20 69 6e 74 65 72 66 61 63 |y) wimp interfac| 000001b0 65 20 2d 20 73 65 63 6f 6e 64 20 69 73 20 6d 61 |e - second is ma| 000001c0 69 6e 20 63 6f 64 65 0d 00 82 04 0d 00 8c 10 68 |in code........h| 000001d0 61 6e 64 6c 65 25 20 3d 20 2d 31 0d 00 96 0e ee |andle% = -1.....| 000001e0 20 85 20 f2 65 72 72 6f 72 0d 00 a0 04 0d 00 aa | . .error.......| 000001f0 15 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f |... "Hourglass_O| 00000200 6e 22 0d 00 b4 0a f2 73 65 74 75 70 0d 00 be 11 |n".....setup....| 00000210 f2 63 68 65 63 6b 66 6f 72 6c 6f 61 64 0d 00 c8 |.checkforload...| 00000220 16 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f |... "Hourglass_O| 00000230 66 66 22 0d 00 d2 17 64 75 6d 6d 79 24 20 3d 20 |ff"....dummy$ = | 00000240 a4 61 63 74 69 6f 6e 28 a3 29 0d 00 dc 0f f2 66 |.action(.).....f| 00000250 69 6e 69 73 68 77 69 6d 70 0d 00 e6 05 e0 0d 00 |inishwimp.......| 00000260 f0 04 0d 00 fa 0c dd 20 f2 73 65 74 75 70 0d 01 |....... .setup..| 00000270 04 09 f2 69 6e 69 74 0d 01 0e 17 61 6c 69 61 73 |...init....alias| 00000280 24 3d 22 3c 57 6f 72 64 24 44 69 72 3e 22 0d 01 |$="<Word$Dir>"..| 00000290 18 1f 76 65 72 73 69 6f 6e 24 3d 22 32 2e 35 32 |..version$="2.52| 000002a0 20 28 31 32 2d 4e 6f 76 2d 39 32 29 22 0d 01 22 | (12-Nov-92)".."| 000002b0 45 de 20 71 25 20 31 30 30 2c 20 62 6c 6f 63 6b |E. q% 100, block| 000002c0 25 20 31 30 30 30 2c 20 6e 65 77 62 6c 6f 63 6b |% 1000, newblock| 000002d0 25 20 31 30 30 30 2c 20 6d 65 6e 62 6c 6b 25 20 |% 1000, menblk% | 000002e0 31 30 30 30 2c 20 6f 6b 62 6c 6f 63 6b 25 20 32 |1000, okblock% 2| 000002f0 30 30 0d 01 2c 24 de 20 6d 61 69 6e 5f 62 6c 6b |00..,$. main_blk| 00000300 25 20 31 30 30 30 2c 20 62 61 63 6b 5f 62 6c 6b |% 1000, back_blk| 00000310 25 20 31 30 30 30 0d 01 36 37 de 20 77 6f 72 64 |% 1000..67. word| 00000320 73 5f 73 75 62 25 20 31 30 30 30 2c 20 6f 75 74 |s_sub% 1000, out| 00000330 70 75 74 5f 73 75 62 25 20 31 30 30 30 2c 20 67 |put_sub% 1000, g| 00000340 61 70 73 5f 73 75 62 25 20 31 30 30 30 0d 01 40 |aps_sub% 1000..@| 00000350 21 de 20 74 65 78 74 25 20 31 30 30 2c 20 73 74 |!. text% 100, st| 00000360 61 74 65 62 6c 6f 63 6b 25 20 31 30 30 30 0d 01 |ateblock% 1000..| 00000370 4a 0e 24 71 25 3d 22 54 41 53 4b 22 0d 01 54 38 |J.$q%="TASK"..T8| 00000380 c8 99 20 22 57 69 6d 70 5f 49 6e 69 74 69 61 6c |.. "Wimp_Initial| 00000390 69 73 65 22 2c 32 30 30 2c 21 71 25 2c 22 57 6f |ise",200,!q%,"Wo| 000003a0 72 64 73 65 61 72 63 68 22 20 b8 20 2c 68 61 6e |rdsearch" . ,han| 000003b0 64 6c 65 25 0d 01 5e 24 c8 99 20 22 57 69 6d 70 |dle%..^$.. "Wimp| 000003c0 5f 43 6c 61 69 6d 49 6e 74 65 72 66 61 63 65 22 |_ClaimInterface"| 000003d0 2c 68 61 6e 64 6c 65 25 0d 01 68 23 f2 73 70 72 |,handle%..h#.spr| 000003e0 69 74 65 73 28 22 3c 57 6f 72 64 24 44 69 72 3e |ites("<Word$Dir>| 000003f0 2e 21 53 70 72 69 74 65 73 22 29 0d 01 72 20 69 |.!Sprites")..r i| 00000400 63 6f 6e 68 25 3d a4 69 63 6f 6e 62 61 72 28 22 |conh%=.iconbar("| 00000410 21 57 6f 72 64 69 63 6f 6e 22 29 0d 01 7c 2c 69 |!Wordicon")..|,i| 00000420 6e 66 6f 25 3d a4 74 65 6d 70 6c 61 74 65 73 28 |nfo%=.templates(| 00000430 22 3c 57 6f 72 64 24 44 69 72 3e 2e 54 65 6d 70 |"<Word$Dir>.Temp| 00000440 6c 61 74 65 73 22 29 0d 01 86 22 f2 73 65 74 5f |lates")...".set_| 00000450 76 65 72 73 69 6f 6e 28 69 6e 66 6f 25 2c 33 2c |version(info%,3,| 00000460 76 65 72 73 69 6f 6e 24 29 0d 01 90 0f f2 6c 6f |version$).....lo| 00000470 61 64 5f 6d 65 6e 75 73 0d 01 9a 12 f2 70 72 65 |ad_menus.....pre| 00000480 62 75 69 6c 64 6d 65 6e 75 73 0d 01 a4 0b 71 75 |buildmenus....qu| 00000490 69 74 25 3d a3 0d 01 ae 0e f2 72 65 73 65 74 6d |it%=......resetm| 000004a0 61 73 6b 0d 01 b8 12 6d 79 74 79 70 65 25 20 3d |ask....mytype% =| 000004b0 20 26 30 34 30 0d 01 c2 18 6d 79 74 79 70 65 24 | &040....mytype$| 000004c0 20 3d 20 22 57 6f 72 64 73 72 63 68 22 0d 01 cc | = "Wordsrch"...| 000004d0 19 6d 79 74 79 70 65 69 6e 68 65 78 24 20 3d 20 |.mytypeinhex$ = | 000004e0 22 26 30 34 30 22 0d 01 d6 0f 64 61 73 68 65 73 |"&040"....dashes| 000004f0 25 20 3d 20 31 0d 01 e0 05 e1 0d 01 ea 04 0d 01 |% = 1...........| 00000500 f4 10 dd 20 f2 72 65 73 65 74 6d 61 73 6b 0d 01 |... .resetmask..| 00000510 fe 1d f4 20 30 2c 31 2c 32 2c 33 2c 34 2c 36 2c |... 0,1,2,3,4,6,| 00000520 37 2c 38 2c 39 2c 31 37 2c 31 38 0d 02 08 1f 6d |7,8,9,17,18....m| 00000530 61 73 6b 25 3d 25 31 30 30 31 31 31 31 31 31 31 |ask%=%1001111111| 00000540 30 30 30 30 31 30 30 30 30 30 0d 02 12 05 e1 0d |0000100000......| 00000550 02 1c 04 0d 02 26 14 dd 20 f2 70 72 65 62 75 69 |.....&.. .prebui| 00000560 6c 64 6d 65 6e 75 73 0d 02 30 2d 6d 65 6e 31 79 |ldmenus..0-men1y| 00000570 25 3d 30 3a f2 62 75 69 6c 64 5f 6d 65 6e 75 28 |%=0:.build_menu(| 00000580 22 57 6f 72 64 73 65 61 72 63 68 22 2c 6d 65 6e |"Wordsearch",men| 00000590 31 79 25 29 0d 02 3a 16 6d 65 6e 31 68 65 69 67 |1y%)..:.men1heig| 000005a0 68 74 25 3d 6d 65 6e 31 79 25 0d 02 44 2f 6d 65 |ht%=men1y%..D/me| 000005b0 6e 32 79 25 3d 30 3a f2 62 75 69 6c 64 5f 6d 65 |n2y%=0:.build_me| 000005c0 6e 75 28 22 20 57 6f 72 64 73 65 61 72 63 68 20 |nu(" Wordsearch | 000005d0 22 2c 6d 65 6e 32 79 25 29 0d 02 4e 16 6d 65 6e |",men2y%)..N.men| 000005e0 32 68 65 69 67 68 74 25 3d 6d 65 6e 32 79 25 0d |2height%=men2y%.| 000005f0 02 58 31 6d 65 6e 33 79 25 3d 30 3a f2 62 75 69 |.X1men3y%=0:.bui| 00000600 6c 64 5f 6d 65 6e 75 28 22 20 20 57 6f 72 64 73 |ld_menu(" Words| 00000610 65 61 72 63 68 20 20 22 2c 6d 65 6e 33 79 25 29 |earch ",men3y%)| 00000620 0d 02 62 16 6d 65 6e 33 68 65 69 67 68 74 25 3d |..b.men3height%=| 00000630 6d 65 6e 33 79 25 0d 02 6c 05 e1 0d 02 76 04 0d |men3y%..l....v..| 00000640 02 80 11 dd 20 f2 6c 6f 61 64 5f 6d 65 6e 75 73 |.... .load_menus| 00000650 0d 02 8a 1c 6c 6d 25 3d 8e 28 22 3c 57 6f 72 64 |....lm%=.("<Word| 00000660 24 44 69 72 3e 2e 4d 65 6e 75 22 29 0d 02 94 0e |$Dir>.Menu")....| 00000670 64 69 6d 25 3d a2 23 6c 6d 25 0d 02 9e 09 d9 23 |dim%=.#lm%.....#| 00000680 6c 6d 25 0d 02 a8 15 de 20 6d 65 6e 75 5f 64 61 |lm%..... menu_da| 00000690 74 61 25 20 64 69 6d 25 0d 02 b2 2f ff 20 22 4c |ta% dim%.../. "L| 000006a0 4f 41 44 20 22 2b 22 3c 57 6f 72 64 24 44 69 72 |OAD "+"<Word$Dir| 000006b0 3e 2e 4d 65 6e 75 20 22 2b c3 7e 28 6d 65 6e 75 |>.Menu "+.~(menu| 000006c0 5f 64 61 74 61 25 29 0d 02 bc 14 63 75 72 72 65 |_data%)....curre| 000006d0 6e 74 5f 6d 65 6e 75 24 3d 22 22 0d 02 c6 05 e1 |nt_menu$="".....| 000006e0 0d 02 d0 04 0d 02 da 17 dd 20 a4 69 63 6f 6e 62 |......... .iconb| 000006f0 61 72 28 73 70 6e 61 6d 65 24 29 0d 02 e4 0e 21 |ar(spname$)....!| 00000700 62 6c 6f 63 6b 25 3d 2d 31 0d 02 ee 0e 62 6c 6f |block%=-1....blo| 00000710 63 6b 25 21 34 3d 30 0d 02 f8 0e 62 6c 6f 63 6b |ck%!4=0....block| 00000720 25 21 38 3d 30 0d 03 02 10 62 6c 6f 63 6b 25 21 |%!8=0....block%!| 00000730 31 32 3d 37 30 0d 03 0c 10 62 6c 6f 63 6b 25 21 |12=70....block%!| 00000740 31 36 3d 37 30 0d 03 16 15 f4 20 62 6c 6f 63 6b |16=70..... block| 00000750 25 21 32 30 3d 26 32 31 30 32 0d 03 20 14 62 6c |%!20=&2102.. .bl| 00000760 6f 63 6b 25 21 32 30 3d 26 31 33 31 38 32 0d 03 |ock%!20=&13182..| 00000770 2a 1c de 20 62 6c 6f 63 6b 25 21 32 34 20 28 a9 |*.. block%!24 (.| 00000780 73 70 6e 61 6d 65 24 2b 31 29 0d 03 34 18 24 28 |spname$+1)..4.$(| 00000790 62 6c 6f 63 6b 25 21 32 34 29 3d 73 70 6e 61 6d |block%!24)=spnam| 000007a0 65 24 0d 03 3e 15 62 6c 6f 63 6b 25 21 32 38 3d |e$..>.block%!28=| 000007b0 73 70 72 69 74 65 25 0d 03 48 1a 62 6c 6f 63 6b |sprite%..H.block| 000007c0 25 21 33 32 3d 28 a9 73 70 6e 61 6d 65 24 2b 31 |%!32=(.spname$+1| 000007d0 29 0d 03 52 28 c8 99 20 22 57 69 6d 70 5f 43 72 |)..R(.. "Wimp_Cr| 000007e0 65 61 74 65 49 63 6f 6e 22 2c 2c 62 6c 6f 63 6b |eateIcon",,block| 000007f0 25 20 b8 20 69 63 6f 6e 25 0d 03 5c 0a 3d 69 63 |% . icon%..\.=ic| 00000800 6f 6e 25 0d 03 66 04 0d 03 70 15 dd 20 f2 73 70 |on%..f...p.. .sp| 00000810 72 69 74 65 73 28 66 69 6c 65 24 29 0d 03 7a 0f |rites(file$)..z.| 00000820 73 70 3d 8e 28 66 69 6c 65 24 29 0d 03 84 10 64 |sp=.(file$)....d| 00000830 69 6d 25 3d a2 23 73 70 2b 31 36 0d 03 8e 08 d9 |im%=.#sp+16.....| 00000840 23 73 70 0d 03 98 12 de 20 73 70 72 69 74 65 25 |#sp..... sprite%| 00000850 20 64 69 6d 25 0d 03 a2 11 21 73 70 72 69 74 65 | dim%....!sprite| 00000860 25 3d 64 69 6d 25 0d 03 ac 0f 73 70 72 69 74 65 |%=dim%....sprite| 00000870 25 21 34 3d 30 0d 03 b6 10 73 70 72 69 74 65 25 |%!4=0....sprite%| 00000880 21 38 3d 31 36 0d 03 c0 11 73 70 72 69 74 65 25 |!8=16....sprite%| 00000890 21 31 32 3d 31 36 0d 03 ca 29 c8 99 20 22 4f 53 |!12=16...).. "OS| 000008a0 5f 53 70 72 69 74 65 4f 70 22 2c 32 35 36 2b 31 |_SpriteOp",256+1| 000008b0 30 2c 73 70 72 69 74 65 25 2c 66 69 6c 65 24 0d |0,sprite%,file$.| 000008c0 03 d4 05 e1 0d 03 de 04 0d 03 e8 13 dd 20 f2 63 |............. .c| 000008d0 68 65 63 6b 66 6f 72 6c 6f 61 64 0d 03 f2 0f ea |heckforload.....| 000008e0 20 66 69 6c 65 6e 61 6d 65 24 0d 03 fc 1e c8 99 | filename$......| 000008f0 20 22 4f 53 5f 47 65 74 45 6e 76 22 20 b8 20 66 | "OS_GetEnv" . f| 00000900 69 6c 65 6e 61 6d 65 24 0d 04 06 35 66 69 6c 65 |ilename$...5file| 00000910 6e 61 6d 65 24 20 3d 20 c1 66 69 6c 65 6e 61 6d |name$ = .filenam| 00000920 65 24 2c a7 66 69 6c 65 6e 61 6d 65 24 2c 22 52 |e$,.filename$,"R| 00000930 75 6e 49 6d 61 67 65 22 29 2b 31 30 29 0d 04 10 |unImage")+10)...| 00000940 18 e7 20 a9 28 66 69 6c 65 6e 61 6d 65 24 29 20 |.. .(filename$) | 00000950 3e 20 30 20 8c 0d 04 1a 18 f2 6c 6f 61 64 67 72 |> 0 ......loadgr| 00000960 69 64 28 66 69 6c 65 6e 61 6d 65 24 29 0d 04 24 |id(filename$)..$| 00000970 23 f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 73 61 |#.set_version(sa| 00000980 76 65 25 2c 31 2c 66 69 6c 65 6e 61 6d 65 24 29 |ve%,1,filename$)| 00000990 0d 04 2e 0d f2 6f 70 65 6e 67 72 69 64 0d 04 38 |.....opengrid..8| 000009a0 05 cd 0d 04 42 05 e1 0d 04 4c 04 0d 04 56 1d dd |....B....L...V..| 000009b0 20 a4 61 63 74 69 6f 6e 28 70 72 6f 63 65 73 73 | .action(process| 000009c0 77 69 6e 64 6f 77 25 29 0d 04 60 18 ea 20 72 65 |window%)..`.. re| 000009d0 73 75 6c 74 24 2c 6e 65 77 72 65 73 75 6c 74 24 |sult$,newresult$| 000009e0 0d 04 6a 05 f5 0d 04 74 11 21 62 6c 6f 63 6b 25 |..j....t.!block%| 000009f0 3d 6d 61 73 6b 25 0d 04 7e 29 c8 99 20 22 57 69 |=mask%..~).. "Wi| 00000a00 6d 70 5f 50 6f 6c 6c 22 2c 6d 61 73 6b 25 2c 62 |mp_Poll",mask%,b| 00000a10 6c 6f 63 6b 25 20 b8 20 72 65 61 73 6f 6e 25 0d |lock% . reason%.| 00000a20 04 88 2a c8 99 20 22 57 69 6d 70 5f 50 6f 6c 6c |..*.. "Wimp_Poll| 00000a30 50 6f 69 6e 74 65 72 22 2c 72 65 61 73 6f 6e 25 |Pointer",reason%| 00000a40 2c 2c 68 61 6e 64 6c 65 25 0d 04 92 10 c8 8e 20 |,,handle%...... | 00000a50 72 65 61 73 6f 6e 25 20 ca 0d 04 9c 47 c9 20 30 |reason% ....G. 0| 00000a60 20 3a 20 e7 20 ac 20 28 70 72 6f 63 65 73 73 77 | : . . (processw| 00000a70 69 6e 64 6f 77 25 20 3d 20 a3 29 20 80 20 72 65 |indow% = .) . re| 00000a80 73 75 6c 74 24 20 3c 3e 20 22 50 61 75 73 65 22 |sult$ <> "Pause"| 00000a90 20 8c 20 f2 69 6d 73 74 69 6c 6c 61 6c 69 76 65 | . .imstillalive| 00000aa0 0d 04 a6 11 c9 20 31 20 3a 20 f2 72 65 6f 70 65 |..... 1 : .reope| 00000ab0 6e 0d 04 b0 0f c9 20 32 20 3a 20 f2 6f 70 65 6e |n..... 2 : .open| 00000ac0 0d 04 ba 10 c9 20 33 20 3a 20 f2 63 6c 6f 73 65 |..... 3 : .close| 00000ad0 0d 04 c4 07 c9 20 36 0d 04 ce b1 e7 20 70 72 6f |..... 6..... pro| 00000ae0 63 65 73 73 77 69 6e 64 6f 77 25 3d a3 20 8c 20 |cesswindow%=. . | 00000af0 f2 63 68 65 63 6b 5f 6d 6f 75 73 65 28 21 62 6c |.check_mouse(!bl| 00000b00 6f 63 6b 25 2c 62 6c 6f 63 6b 25 21 34 2c 62 6c |ock%,block%!4,bl| 00000b10 6f 63 6b 25 21 38 2c 62 6c 6f 63 6b 25 21 31 32 |ock%!8,block%!12| 00000b20 2c 62 6c 6f 63 6b 25 21 31 36 29 20 8b 20 6e 65 |,block%!16) . ne| 00000b30 77 72 65 73 75 6c 74 24 20 3d 20 a4 73 65 63 6f |wresult$ = .seco| 00000b40 6e 64 61 72 79 63 6c 69 63 6b 28 70 72 6f 63 65 |ndaryclick(proce| 00000b50 73 73 77 69 6e 64 6f 77 25 2c 62 6c 6f 63 6b 25 |sswindow%,block%| 00000b60 21 31 32 2c 62 6c 6f 63 6b 25 21 31 36 2c 62 6c |!12,block%!16,bl| 00000b70 6f 63 6b 25 21 38 2c 21 62 6c 6f 63 6b 25 2c 62 |ock%!8,!block%,b| 00000b80 6c 6f 63 6b 25 21 34 29 0d 04 d8 45 e7 20 ac 20 |lock%!4)...E. . | 00000b90 28 72 65 73 75 6c 74 24 20 3d 20 20 22 50 61 75 |(result$ = "Pau| 00000ba0 73 65 22 20 80 20 6e 65 77 72 65 73 75 6c 74 24 |se" . newresult$| 00000bb0 20 3d 20 22 22 29 20 8c 20 72 65 73 75 6c 74 24 | = "") . result$| 00000bc0 20 3d 20 6e 65 77 72 65 73 75 6c 74 24 0d 04 e2 | = newresult$...| 00000bd0 2a c9 20 37 20 3a 20 e7 20 70 72 6f 63 65 73 73 |*. 7 : . process| 00000be0 77 69 6e 64 6f 77 25 3d a3 20 8c 20 f2 66 69 6e |window%=. . .fin| 00000bf0 69 73 68 64 72 61 67 0d 04 ec 53 c9 20 38 20 3a |ishdrag...S. 8 :| 00000c00 20 e7 20 70 72 6f 63 65 73 73 77 69 6e 64 6f 77 | . processwindow| 00000c10 25 3d a3 20 8c 20 f2 6b 65 79 70 72 65 73 73 65 |%=. . .keypresse| 00000c20 64 28 62 6c 6f 63 6b 25 21 32 34 2c 21 62 6c 6f |d(block%!24,!blo| 00000c30 63 6b 25 2c 62 6c 6f 63 6b 25 21 34 29 20 8b 20 |ck%,block%!4) . | 00000c40 f2 70 61 73 73 6f 6e 6b 65 79 0d 04 f6 16 c9 20 |.passonkey..... | 00000c50 39 20 3a 20 f2 6d 65 6e 75 5f 73 65 6c 65 63 74 |9 : .menu_select| 00000c60 0d 05 00 2a c9 20 31 37 2c 31 38 20 3a 20 f2 77 |...*. 17,18 : .w| 00000c70 69 6d 70 6d 65 73 73 61 67 65 28 70 72 6f 63 65 |impmessage(proce| 00000c80 73 73 77 69 6e 64 6f 77 25 29 0d 05 0a 05 cb 0d |sswindow%)......| 00000c90 05 14 35 fd 20 71 75 69 74 25 20 84 20 28 20 70 |..5. quit% . ( p| 00000ca0 72 6f 63 65 73 73 77 69 6e 64 6f 77 25 20 80 20 |rocesswindow% . | 00000cb0 72 65 73 75 6c 74 24 20 3c 3e 20 22 50 61 75 73 |result$ <> "Paus| 00000cc0 65 22 20 29 0d 05 1e 0c 3d 72 65 73 75 6c 74 24 |e" )....=result$| 00000cd0 0d 05 28 04 0d 05 32 13 dd 20 f2 69 6d 73 74 69 |..(...2.. .imsti| 00000ce0 6c 6c 61 6c 69 76 65 0d 05 3c 72 e7 20 a9 28 a4 |llalive..<r. .(.| 00000cf0 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c 65 |textfromwritable| 00000d00 28 66 69 74 74 69 6e 67 25 2c 32 29 29 20 3d 20 |(fitting%,2)) = | 00000d10 32 35 20 8c 20 64 61 73 68 65 73 25 20 3d 20 2d |25 . dashes% = -| 00000d20 31 20 8b 20 e7 20 a9 28 a4 74 65 78 74 66 72 6f |1 . . .(.textfro| 00000d30 6d 77 72 69 74 61 62 6c 65 28 66 69 74 74 69 6e |mwritable(fittin| 00000d40 67 25 2c 32 29 29 20 3d 20 30 20 20 8c 20 64 61 |g%,2)) = 0 . da| 00000d50 73 68 65 73 25 20 3d 20 31 0d 05 46 ac e7 20 64 |shes% = 1..F.. d| 00000d60 61 73 68 65 73 25 20 3d 20 31 20 8c 20 f2 73 65 |ashes% = 1 . .se| 00000d70 74 5f 76 65 72 73 69 6f 6e 28 66 69 74 74 69 6e |t_version(fittin| 00000d80 67 25 2c 32 2c a4 74 65 78 74 66 72 6f 6d 77 72 |g%,2,.textfromwr| 00000d90 69 74 61 62 6c 65 28 66 69 74 74 69 6e 67 25 2c |itable(fitting%,| 00000da0 32 29 2b 22 2d 22 29 20 8b 20 f2 73 65 74 5f 76 |2)+"-") . .set_v| 00000db0 65 72 73 69 6f 6e 28 66 69 74 74 69 6e 67 25 2c |ersion(fitting%,| 00000dc0 32 2c c0 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 |2,..textfromwrit| 00000dd0 61 62 6c 65 28 66 69 74 74 69 6e 67 25 2c 32 29 |able(fitting%,2)| 00000de0 2c a9 28 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 |,.(.textfromwrit| 00000df0 61 62 6c 65 28 66 69 74 74 69 6e 67 25 2c 32 29 |able(fitting%,2)| 00000e00 29 2d 31 29 29 0d 05 50 05 e1 0d 05 5a 04 0d 05 |)-1))..P....Z...| 00000e10 64 10 dd 20 f2 70 61 73 73 6f 6e 6b 65 79 0d 05 |d.. .passonkey..| 00000e20 6e 22 c8 99 20 22 57 69 6d 70 5f 50 72 6f 63 65 |n".. "Wimp_Proce| 00000e30 73 73 4b 65 79 22 2c 62 6c 6f 63 6b 25 21 32 34 |ssKey",block%!24| 00000e40 0d 05 78 05 e1 0d 05 82 04 0d 05 8c 28 dd 20 f2 |..x.........(. .| 00000e50 6b 65 79 70 72 65 73 73 65 64 28 6b 65 79 25 2c |keypressed(key%,| 00000e60 77 69 6e 68 6e 64 25 2c 69 63 6f 6e 68 6e 64 25 |winhnd%,iconhnd%| 00000e70 29 0d 05 96 0d c8 8e 20 6b 65 79 25 20 ca 0d 05 |)...... key% ...| 00000e80 a0 25 c9 20 26 30 44 20 3a 20 f2 72 65 74 75 72 |.%. &0D : .retur| 00000e90 6e 28 77 69 6e 68 6e 64 25 2c 69 63 6f 6e 68 6e |n(winhnd%,iconhn| 00000ea0 64 25 29 0d 05 aa 27 c9 20 26 31 38 46 20 3a 20 |d%)...'. &18F : | 00000eb0 f2 75 70 61 72 72 6f 77 28 77 69 6e 68 6e 64 25 |.uparrow(winhnd%| 00000ec0 2c 69 63 6f 6e 68 6e 64 25 29 0d 05 b4 29 c9 20 |,iconhnd%)...). | 00000ed0 26 31 38 45 20 3a 20 f2 64 6f 77 6e 61 72 72 6f |&18E : .downarro| 00000ee0 77 28 77 69 6e 68 6e 64 25 2c 69 63 6f 6e 68 6e |w(winhnd%,iconhn| 00000ef0 64 25 29 0d 05 be 10 7f 20 f2 70 61 73 73 6f 6e |d%)..... .passon| 00000f00 6b 65 79 0d 05 c8 05 cb 0d 05 d2 05 e1 0d 05 dc |key.............| 00000f10 04 0d 05 e6 1f dd 20 f2 72 65 74 75 72 6e 28 77 |...... .return(w| 00000f20 69 6e 68 6e 64 25 2c 69 63 6f 6e 68 6e 64 25 29 |inhnd%,iconhnd%)| 00000f30 0d 05 f0 10 c8 8e 20 77 69 6e 68 6e 64 25 20 ca |...... winhnd% .| 00000f40 0d 05 fa 0e c9 20 6e 65 77 67 72 69 64 25 0d 06 |..... newgrid%..| 00000f50 04 14 e7 20 69 63 6f 6e 68 6e 64 25 20 3d 20 33 |... iconhnd% = 3| 00000f60 20 8c 0d 06 0e 11 f2 63 68 65 63 6b 6e 65 77 67 | ......checknewg| 00000f70 72 69 64 0d 06 18 1b f2 63 6c 6f 73 65 6f 6e 63 |rid.....closeonc| 00000f80 6c 69 63 6b 28 6e 65 77 67 72 69 64 25 29 0d 06 |lick(newgrid%)..| 00000f90 22 2d cc 20 e7 20 69 63 6f 6e 68 6e 64 25 20 3d |"-. . iconhnd% =| 00000fa0 20 32 20 8c 20 f2 64 6f 77 6e 61 72 72 6f 77 28 | 2 . .downarrow(| 00000fb0 6e 65 77 67 72 69 64 25 2c 32 29 0d 06 2c 05 cd |newgrid%,2)..,..| 00000fc0 0d 06 36 1d c9 20 6e 65 77 77 6f 72 64 25 20 3a |..6.. newword% :| 00000fd0 20 f2 63 61 6c 6c 6e 65 77 77 6f 72 64 0d 06 40 | .callnewword..@| 00000fe0 0b c9 20 73 61 76 65 25 0d 06 4a 2c e7 20 a7 a4 |.. save%..J,. ..| 00000ff0 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c 65 |textfromwritable| 00001000 28 73 61 76 65 25 2c 31 29 2c 22 3a 22 29 20 3e |(save%,1),":") >| 00001010 20 30 20 8c 0d 06 54 29 f2 73 61 76 65 67 72 69 | 0 ...T).savegri| 00001020 64 28 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 61 |d(.textfromwrita| 00001030 62 6c 65 28 73 61 76 65 25 2c 31 29 29 0d 06 5e |ble(save%,1))..^| 00001040 18 f2 63 6c 6f 73 65 6f 6e 63 6c 69 63 6b 28 73 |..closeonclick(s| 00001050 61 76 65 25 29 0d 06 68 05 cc 0d 06 72 12 f2 70 |ave%)..h....r..p| 00001060 72 6f 74 65 73 74 61 74 6e 61 6d 65 0d 06 7c 05 |rotestatname..|.| 00001070 cd 0d 06 86 0f c9 20 73 61 76 65 74 65 78 74 25 |...... savetext%| 00001080 0d 06 90 30 e7 20 a7 a4 74 65 78 74 66 72 6f 6d |...0. ..textfrom| 00001090 77 72 69 74 61 62 6c 65 28 73 61 76 65 74 65 78 |writable(savetex| 000010a0 74 25 2c 31 29 2c 22 3a 22 29 20 3e 20 30 20 8c |t%,1),":") > 0 .| 000010b0 0d 06 9a 2f f2 73 61 76 65 61 73 74 65 78 74 28 |.../.saveastext(| 000010c0 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c |.textfromwritabl| 000010d0 65 28 73 61 76 65 74 65 78 74 25 2c 31 29 29 0d |e(savetext%,1)).| 000010e0 06 a4 1c f2 63 6c 6f 73 65 6f 6e 63 6c 69 63 6b |....closeonclick| 000010f0 28 73 61 76 65 74 65 78 74 25 29 0d 06 ae 05 cc |(savetext%).....| 00001100 0d 06 b8 12 f2 70 72 6f 74 65 73 74 61 74 6e 61 |.....protestatna| 00001110 6d 65 0d 06 c2 05 cd 0d 06 cc 0d c9 20 72 65 6d |me.......... rem| 00001120 6f 76 65 25 0d 06 d6 29 f2 72 65 6d 6f 76 65 28 |ove%...).remove(| 00001130 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c |.textfromwritabl| 00001140 65 28 72 65 6d 6f 76 65 25 2c 30 29 29 0d 06 e0 |e(remove%,0))...| 00001150 05 cb 0d 06 ea 05 e1 0d 06 f4 04 0d 06 fe 16 dd |................| 00001160 20 f2 63 6c 65 61 72 72 65 6d 6f 76 65 69 63 6f | .clearremoveico| 00001170 6e 0d 07 08 1e f2 73 65 74 5f 76 65 72 73 69 6f |n.....set_versio| 00001180 6e 28 72 65 6d 6f 76 65 25 2c 30 2c 22 22 29 0d |n(remove%,0,"").| 00001190 07 12 18 f2 73 65 74 63 61 72 65 74 28 72 65 6d |....setcaret(rem| 000011a0 6f 76 65 25 2c 30 29 0d 07 1c 05 e1 0d 07 26 04 |ove%,0).......&.| 000011b0 0d 07 30 20 dd 20 f2 75 70 61 72 72 6f 77 28 77 |..0 . .uparrow(w| 000011c0 69 6e 68 6e 64 25 2c 69 63 6f 6e 68 6e 64 25 29 |inhnd%,iconhnd%)| 000011d0 0d 07 3a 3f e7 20 77 69 6e 68 6e 64 25 20 3d 20 |..:?. winhnd% = | 000011e0 6e 65 77 67 72 69 64 25 20 80 20 69 63 6f 6e 68 |newgrid% . iconh| 000011f0 6e 64 25 20 3d 20 33 20 8c 20 f2 73 65 74 63 61 |nd% = 3 . .setca| 00001200 72 65 74 28 6e 65 77 67 72 69 64 25 2c 32 29 0d |ret(newgrid%,2).| 00001210 07 44 05 e1 0d 07 4e 04 0d 07 58 22 dd 20 f2 64 |.D....N...X". .d| 00001220 6f 77 6e 61 72 72 6f 77 28 77 69 6e 68 6e 64 25 |ownarrow(winhnd%| 00001230 2c 69 63 6f 6e 68 6e 64 25 29 0d 07 62 3f e7 20 |,iconhnd%)..b?. | 00001240 77 69 6e 68 6e 64 25 20 3d 20 6e 65 77 67 72 69 |winhnd% = newgri| 00001250 64 25 20 80 20 69 63 6f 6e 68 6e 64 25 20 3d 20 |d% . iconhnd% = | 00001260 32 20 8c 20 f2 73 65 74 63 61 72 65 74 28 6e 65 |2 . .setcaret(ne| 00001270 77 67 72 69 64 25 2c 33 29 0d 07 6c 05 e1 0d 07 |wgrid%,3)..l....| 00001280 76 04 0d 07 80 21 dd 20 f2 73 65 74 63 61 72 65 |v....!. .setcare| 00001290 74 28 77 69 6e 68 6e 64 25 2c 69 63 6f 6e 68 6e |t(winhnd%,iconhn| 000012a0 64 25 29 0d 07 8a 5b c8 99 20 22 57 69 6d 70 5f |d%)...[.. "Wimp_| 000012b0 53 65 74 43 61 72 65 74 50 6f 73 69 74 69 6f 6e |SetCaretPosition| 000012c0 22 2c 77 69 6e 68 6e 64 25 2c 69 63 6f 6e 68 6e |",winhnd%,iconhn| 000012d0 64 25 2c 2c 2c 2d 31 2c a9 28 a4 74 65 78 74 66 |d%,,,-1,.(.textf| 000012e0 72 6f 6d 77 72 69 74 61 62 6c 65 28 77 69 6e 68 |romwritable(winh| 000012f0 6e 64 25 2c 69 63 6f 6e 68 6e 64 25 29 29 0d 07 |nd%,iconhnd%))..| 00001300 94 05 e1 0d 07 9e 04 0d 07 a8 11 dd 20 f2 66 69 |............ .fi| 00001310 6e 69 73 68 64 72 61 67 0d 07 b2 1b f4 20 49 63 |nishdrag..... Ic| 00001320 6f 6e 20 68 61 73 20 62 65 65 6e 20 64 72 6f 70 |on has been drop| 00001330 70 65 64 0d 07 bc 1d f4 20 78 30 2c 79 34 2c 62 |ped..... x0,y4,b| 00001340 75 74 38 2c 77 69 6e 31 32 2c 69 63 6f 6e 31 36 |ut8,win12,icon16| 00001350 0d 07 c6 27 c8 99 20 22 57 69 6d 70 5f 47 65 74 |...'.. "Wimp_Get| 00001360 50 6f 69 6e 74 65 72 49 6e 66 6f 22 2c 2c 6e 65 |PointerInfo",,ne| 00001370 77 62 6c 6f 63 6b 25 0d 07 d0 31 6e 65 77 62 6c |wblock%...1newbl| 00001380 6f 63 6b 25 21 32 30 3d 6e 65 77 62 6c 6f 63 6b |ock%!20=newblock| 00001390 25 21 31 32 20 20 20 3a 20 f4 20 57 69 6e 64 6f |%!12 : . Windo| 000013a0 77 20 68 61 6e 64 6c 65 0d 07 da 2f 6e 65 77 62 |w handle.../newb| 000013b0 6c 6f 63 6b 25 21 32 34 3d 6e 65 77 62 6c 6f 63 |lock%!24=newbloc| 000013c0 6b 25 21 31 36 20 20 20 3a 20 f4 20 69 63 6f 6e |k%!16 : . icon| 000013d0 20 68 61 6e 64 6c 65 0d 07 e4 25 6e 65 77 62 6c | handle...%newbl| 000013e0 6f 63 6b 25 21 32 38 3d 21 6e 65 77 62 6c 6f 63 |ock%!28=!newbloc| 000013f0 6b 25 20 20 20 20 20 3a 20 f4 20 78 0d 07 ee 25 |k% : . x...%| 00001400 6e 65 77 62 6c 6f 63 6b 25 21 33 32 3d 6e 65 77 |newblock%!32=new| 00001410 62 6c 6f 63 6b 25 21 34 20 20 20 20 3a 20 f4 20 |block%!4 : . | 00001420 79 0d 07 f8 12 21 6e 65 77 62 6c 6f 63 6b 25 3d |y....!newblock%=| 00001430 32 35 36 0d 08 02 12 6e 65 77 62 6c 6f 63 6b 25 |256....newblock%| 00001440 21 31 32 3d 30 0d 08 0c 31 6e 65 77 62 6c 6f 63 |!12=0...1newbloc| 00001450 6b 25 21 31 36 3d 31 20 20 20 20 20 20 20 20 20 |k%!16=1 | 00001460 20 20 3a 20 f4 20 4d 65 73 73 61 67 65 5f 44 61 | : . Message_Da| 00001470 74 61 53 61 76 65 0d 08 16 2d 6e 65 77 62 6c 6f |taSave...-newblo| 00001480 63 6b 25 21 33 36 3d 37 35 30 20 20 20 20 20 20 |ck%!36=750 | 00001490 20 20 20 3a 20 f4 20 53 69 7a 65 20 6f 66 20 66 | : . Size of f| 000014a0 69 6c 65 0d 08 20 16 e7 20 64 72 61 67 24 20 3d |ile.. .. drag$ =| 000014b0 20 22 6e 6f 72 6d 22 20 8c 0d 08 2a 18 6e 65 77 | "norm" ...*.new| 000014c0 62 6c 6f 63 6b 25 21 34 30 3d 6d 79 74 79 70 65 |block%!40=mytype| 000014d0 25 0d 08 34 39 24 28 6e 65 77 62 6c 6f 63 6b 25 |%..49$(newblock%| 000014e0 2b 34 34 29 3d a4 6c 65 61 66 6e 61 6d 65 28 a4 |+44)=.leafname(.| 000014f0 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c 65 |textfromwritable| 00001500 28 73 61 76 65 25 2c 31 29 29 0d 08 3e 05 cc 0d |(save%,1))..>...| 00001510 08 48 15 6e 65 77 62 6c 6f 63 6b 25 21 34 30 3d |.H.newblock%!40=| 00001520 26 46 46 46 0d 08 52 3d 24 28 6e 65 77 62 6c 6f |&FFF..R=$(newblo| 00001530 63 6b 25 2b 34 34 29 3d a4 6c 65 61 66 6e 61 6d |ck%+44)=.leafnam| 00001540 65 28 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 61 |e(.textfromwrita| 00001550 62 6c 65 28 73 61 76 65 74 65 78 74 25 2c 31 29 |ble(savetext%,1)| 00001560 29 0d 08 5c 05 cd 0d 08 66 26 3f 28 6e 65 77 62 |)..\....f&?(newb| 00001570 6c 6f 63 6b 25 2b 34 34 2b a9 24 28 6e 65 77 62 |lock%+44+.$(newb| 00001580 6c 6f 63 6b 25 2b 34 34 29 29 3d 30 0d 08 70 26 |lock%+44))=0..p&| 00001590 c8 99 20 22 57 69 6d 70 5f 53 65 6e 64 4d 65 73 |.. "Wimp_SendMes| 000015a0 73 61 67 65 22 2c 31 37 2c 6e 65 77 62 6c 6f 63 |sage",17,newbloc| 000015b0 6b 25 0d 08 7a 1a 73 61 76 65 72 65 66 25 20 3d |k%..z.saveref% =| 000015c0 20 6e 65 77 62 6c 6f 63 6b 25 21 38 0d 08 84 05 | newblock%!8....| 000015d0 e1 0d 08 8e 04 0d 08 98 1a dd 20 a4 6c 65 61 66 |.......... .leaf| 000015e0 6e 61 6d 65 28 70 61 74 68 6e 61 6d 65 24 29 0d |name(pathname$).| 000015f0 08 a2 18 ea 20 62 65 67 69 6e 6e 69 6e 67 25 2c |.... beginning%,| 00001600 6c 65 74 74 65 72 25 0d 08 ac 1a 6c 65 74 74 65 |letter%....lette| 00001610 72 25 20 3d 20 a9 28 70 61 74 68 6e 61 6d 65 24 |r% = .(pathname$| 00001620 29 0d 08 b6 31 c8 95 20 c1 70 61 74 68 6e 61 6d |)...1.. .pathnam| 00001630 65 24 2c 6c 65 74 74 65 72 25 2c 31 29 20 3c 3e |e$,letter%,1) <>| 00001640 20 22 2e 22 20 80 20 6c 65 74 74 65 72 25 20 3e | "." . letter% >| 00001650 20 30 0d 08 c0 10 6c 65 74 74 65 72 25 20 2d 3d | 0....letter% -=| 00001660 20 31 0d 08 ca 05 ce 0d 08 d4 1a 3d c1 70 61 74 | 1.........=.pat| 00001670 68 6e 61 6d 65 24 2c 6c 65 74 74 65 72 25 2b 31 |hname$,letter%+1| 00001680 29 0d 08 de 04 0d 08 e8 22 dd 20 f2 77 69 6d 70 |).......". .wimp| 00001690 6d 65 73 73 61 67 65 28 70 72 6f 63 65 73 73 77 |message(processw| 000016a0 69 6e 64 6f 77 25 29 0d 08 f2 12 c8 8e 20 62 6c |indow%)...... bl| 000016b0 6f 63 6b 25 21 31 36 20 ca 0d 08 fc 18 c9 20 30 |ock%!16 ...... 0| 000016c0 20 3a 20 f4 20 4d 65 73 73 61 67 65 5f 51 75 69 | : . Message_Qui| 000016d0 74 0d 09 06 0d 71 75 69 74 25 20 3d 20 b9 0d 09 |t....quit% = ...| 000016e0 10 1f c9 20 32 20 3a 20 f4 20 4d 65 73 73 61 67 |... 2 : . Messag| 000016f0 65 5f 44 61 74 61 53 61 76 65 41 63 6b 0d 09 1a |e_DataSaveAck...| 00001700 18 e7 20 70 72 6f 63 65 73 73 77 69 6e 64 6f 77 |.. processwindow| 00001710 25 3d a3 20 8c 0d 09 24 3a e7 20 64 72 61 67 24 |%=. ...$:. drag$| 00001720 20 3d 20 22 6e 6f 72 6d 22 20 8c 20 f2 73 61 76 | = "norm" . .sav| 00001730 65 66 72 6f 6d 77 69 6d 70 20 8b 20 f2 73 61 76 |efromwimp . .sav| 00001740 65 61 73 74 65 78 74 66 72 6f 6d 77 69 6d 70 0d |eastextfromwimp.| 00001750 09 2e 05 cd 0d 09 38 1c c9 20 33 20 3a 20 f4 20 |......8.. 3 : . | 00001760 4d 65 73 73 61 67 65 5f 44 61 74 61 4c 6f 61 64 |Message_DataLoad| 00001770 0d 09 42 26 e7 20 ac 20 70 72 6f 63 65 73 73 77 |..B&. . processw| 00001780 69 6e 64 6f 77 25 20 8c 20 f2 6c 6f 61 64 66 72 |indow% . .loadfr| 00001790 6f 6d 77 69 6d 70 0d 09 4c 1c c9 20 35 20 3a 20 |omwimp..L.. 5 : | 000017a0 f4 20 4d 65 73 73 61 67 65 5f 44 61 74 61 4f 70 |. Message_DataOp| 000017b0 65 6e 0d 09 56 3c e7 20 ac 20 70 72 6f 63 65 73 |en..V<. . proces| 000017c0 73 77 69 6e 64 6f 77 25 20 80 20 62 6c 6f 63 6b |swindow% . block| 000017d0 25 21 34 30 20 3d 20 6d 79 74 79 70 65 25 20 8c |%!40 = mytype% .| 000017e0 20 f2 6c 6f 61 64 66 72 6f 6d 77 69 6d 70 0d 09 | .loadfromwimp..| 000017f0 60 1b c9 20 38 20 3a 20 f4 20 4d 65 73 73 61 67 |`.. 8 : . Messag| 00001800 65 5f 50 72 65 51 75 69 74 0d 09 6a 2d e7 20 67 |e_PreQuit..j-. g| 00001810 72 69 64 64 65 66 69 6e 65 64 25 20 3d 20 b9 20 |riddefined% = . | 00001820 80 20 73 61 76 65 64 25 20 3d 20 a3 20 8c 20 f2 |. saved% = . . .| 00001830 6f 62 6a 65 63 74 0d 09 74 23 c9 20 26 35 30 32 |object..t#. &502| 00001840 20 3a 20 f4 20 48 65 6c 70 20 6d 65 73 73 61 67 | : . Help messag| 00001850 65 20 72 65 71 75 65 73 74 0d 09 7e 25 c8 99 20 |e request..~%.. | 00001860 22 57 69 6d 70 5f 53 65 6e 64 49 6e 66 6f 72 6d |"Wimp_SendInform| 00001870 61 74 69 6f 6e 22 2c 2c 62 6c 6f 63 6b 25 0d 09 |ation",,block%..| 00001880 88 05 cb 0d 09 92 05 e1 0d 09 9c 04 0d 09 a6 0d |................| 00001890 dd 20 f2 6f 62 6a 65 63 74 0d 09 b0 1b e7 20 a4 |. .object..... .| 000018a0 72 61 69 73 65 6f 62 6a 65 63 74 69 6f 6e 20 3d |raiseobjection =| 000018b0 20 a3 20 8c 0d 09 ba 18 62 6c 6f 63 6b 25 21 31 | . .....block%!1| 000018c0 32 20 3d 20 62 6c 6f 63 6b 25 21 38 0d 09 c4 25 |2 = block%!8...%| 000018d0 c8 99 20 22 57 69 6d 70 5f 53 65 6e 64 4d 65 73 |.. "Wimp_SendMes| 000018e0 73 61 67 65 22 2c 31 39 2c 62 6c 6f 63 6b 25 2c |sage",19,block%,| 000018f0 30 0d 09 ce 05 cd 0d 09 d8 05 e1 0d 09 e2 04 0d |0...............| 00001900 09 ec 15 dd 20 a4 72 61 69 73 65 6f 62 6a 65 63 |.... .raiseobjec| 00001910 74 69 6f 6e 0d 09 f6 5f 3d a4 79 6f 72 6e 28 22 |tion..._=.yorn("| 00001920 31 20 66 69 6c 65 20 65 64 69 74 65 64 20 62 75 |1 file edited bu| 00001930 74 20 6e 6f 74 20 73 61 76 65 64 20 69 6e 20 57 |t not saved in W| 00001940 6f 72 64 73 65 61 72 63 68 20 43 72 65 61 74 6f |ordsearch Creato| 00001950 72 2e 20 41 72 65 20 79 6f 75 20 73 75 72 65 20 |r. Are you sure | 00001960 79 6f 75 20 77 61 6e 74 20 74 6f 20 51 75 69 74 |you want to Quit| 00001970 3f 22 29 0d 0a 00 04 0d 0a 0a 13 dd 20 f2 73 61 |?")......... .sa| 00001980 76 65 66 72 6f 6d 77 69 6d 70 0d 0a 14 30 e7 20 |vefromwimp...0. | 00001990 62 6c 6f 63 6b 25 21 31 32 20 3c 3e 20 73 61 76 |block%!12 <> sav| 000019a0 65 72 65 66 25 20 84 20 62 6c 6f 63 6b 25 21 33 |eref% . block%!3| 000019b0 36 20 3d 20 2d 31 20 8c 20 e1 0d 0a 1e 23 f2 73 |6 = -1 . ....#.s| 000019c0 61 76 65 67 72 69 64 28 a4 66 69 6e 64 6e 61 6d |avegrid(.findnam| 000019d0 65 28 62 6c 6f 63 6b 25 2b 34 34 29 29 0d 0a 28 |e(block%+44))..(| 000019e0 2e f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 73 61 |..set_version(sa| 000019f0 76 65 25 2c 31 2c a4 66 69 6e 64 6e 61 6d 65 28 |ve%,1,.findname(| 00001a00 62 6c 6f 63 6b 25 2b 34 34 29 29 0d 0a 32 05 e1 |block%+44))..2..| 00001a10 0d 0a 3c 04 0d 0a 46 19 dd 20 f2 73 61 76 65 61 |..<...F.. .savea| 00001a20 73 74 65 78 74 66 72 6f 6d 77 69 6d 70 0d 0a 50 |stextfromwimp..P| 00001a30 30 e7 20 62 6c 6f 63 6b 25 21 31 32 20 3c 3e 20 |0. block%!12 <> | 00001a40 73 61 76 65 72 65 66 25 20 84 20 62 6c 6f 63 6b |saveref% . block| 00001a50 25 21 33 36 20 3d 20 2d 31 20 8c 20 e1 0d 0a 5a |%!36 = -1 . ...Z| 00001a60 25 f2 73 61 76 65 61 73 74 65 78 74 28 a4 66 69 |%.saveastext(.fi| 00001a70 6e 64 6e 61 6d 65 28 62 6c 6f 63 6b 25 2b 34 34 |ndname(block%+44| 00001a80 29 29 0d 0a 64 32 f2 73 65 74 5f 76 65 72 73 69 |))..d2.set_versi| 00001a90 6f 6e 28 73 61 76 65 74 65 78 74 25 2c 31 2c a4 |on(savetext%,1,.| 00001aa0 66 69 6e 64 6e 61 6d 65 28 62 6c 6f 63 6b 25 2b |findname(block%+| 00001ab0 34 34 29 29 0d 0a 6e 05 e1 0d 0a 78 04 0d 0a 82 |44))..n....x....| 00001ac0 13 dd 20 f2 6c 6f 61 64 66 72 6f 6d 77 69 6d 70 |.. .loadfromwimp| 00001ad0 0d 0a 8c 65 e7 20 62 6c 6f 63 6b 25 21 34 30 20 |...e. block%!40 | 00001ae0 3c 3e 20 6d 79 74 79 70 65 25 20 8c 20 f2 6f 6b |<> mytype% . .ok| 00001af0 28 22 49 20 63 61 6e 20 6f 6e 6c 79 20 6c 6f 61 |("I can only loa| 00001b00 64 20 22 2b 6d 79 74 79 70 65 24 2b 22 20 66 69 |d "+mytype$+" fi| 00001b10 6c 65 73 20 28 66 69 6c 65 74 79 70 65 20 22 2b |les (filetype "+| 00001b20 6d 79 74 79 70 65 69 6e 68 65 78 24 2b 22 29 22 |mytypeinhex$+")"| 00001b30 29 20 3a 20 e1 0d 0a 96 10 ea 20 63 6f 6e 64 69 |) : ...... condi| 00001b40 74 69 6f 6e 25 0d 0a a0 12 63 6f 6e 64 69 74 69 |tion%....conditi| 00001b50 6f 6e 25 20 3d 20 a3 0d 0a aa 11 21 62 6c 6f 63 |on% = .....!bloc| 00001b60 6b 25 20 3d 20 32 35 36 0d 0a b4 18 62 6c 6f 63 |k% = 256....bloc| 00001b70 6b 25 21 31 32 20 3d 20 62 6c 6f 63 6b 25 21 38 |k%!12 = block%!8| 00001b80 0d 0a be 11 62 6c 6f 63 6b 25 21 31 36 20 3d 20 |....block%!16 = | 00001b90 34 0d 0a c8 49 c8 99 20 22 57 69 6d 70 5f 53 65 |4...I.. "Wimp_Se| 00001ba0 6e 64 4d 65 73 73 61 67 65 22 2c 31 37 2c 62 6c |ndMessage",17,bl| 00001bb0 6f 63 6b 25 2c 62 6c 6f 63 6b 25 21 34 20 3a 20 |ock%,block%!4 : | 00001bc0 f4 20 53 65 6e 64 20 4d 65 73 73 61 67 65 5f 44 |. Send Message_D| 00001bd0 61 74 61 4c 6f 61 64 41 63 6b 0d 0a d2 b5 e7 20 |ataLoadAck..... | 00001be0 67 72 69 64 64 65 66 69 6e 65 64 25 20 80 20 63 |griddefined% . c| 00001bf0 68 61 6e 67 65 64 25 20 3d 20 b9 20 8c 20 e7 20 |hanged% = . . . | 00001c00 a4 79 6f 72 6e 28 22 54 68 69 73 20 77 69 6c 6c |.yorn("This will| 00001c10 20 64 65 6c 65 74 65 20 74 68 65 20 67 72 69 64 | delete the grid| 00001c20 20 79 6f 75 20 68 61 76 65 20 61 6c 72 65 61 64 | you have alread| 00001c30 79 20 6d 61 64 65 2e 20 43 6c 69 63 6b 20 4f 4b |y made. Click OK| 00001c40 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 6e 65 77 | to load the new| 00001c50 20 67 72 69 64 20 69 6e 73 74 65 61 64 20 6f 72 | grid instead or| 00001c60 20 43 61 6e 63 65 6c 20 74 6f 20 6b 65 65 70 20 | Cancel to keep | 00001c70 74 68 65 20 6f 6c 64 20 6f 6e 65 2e 22 29 20 8c |the old one.") .| 00001c80 20 63 6f 6e 64 69 74 69 6f 6e 25 20 3d 20 b9 0d | condition% = ..| 00001c90 0a dc 32 e7 20 67 72 69 64 64 65 66 69 6e 65 64 |..2. griddefined| 00001ca0 25 20 80 20 63 68 61 6e 67 65 64 25 20 3d 20 a3 |% . changed% = .| 00001cb0 20 8c 20 63 6f 6e 64 69 74 69 6f 6e 25 20 3d 20 | . condition% = | 00001cc0 b9 0d 0a e6 25 e7 20 ac 20 67 72 69 64 64 65 66 |....%. . griddef| 00001cd0 69 6e 65 64 25 20 8c 20 63 6f 6e 64 69 74 69 6f |ined% . conditio| 00001ce0 6e 25 20 3d 20 b9 0d 0a f0 16 e7 20 63 6f 6e 64 |n% = ...... cond| 00001cf0 69 74 69 6f 6e 25 20 3d 20 b9 20 8c 0d 0a fa 26 |ition% = . ....&| 00001d00 20 20 20 f2 6c 6f 61 64 67 72 69 64 28 a4 66 69 | .loadgrid(.fi| 00001d10 6e 64 6e 61 6d 65 28 62 6c 6f 63 6b 25 2b 34 34 |ndname(block%+44| 00001d20 29 29 0d 0b 04 31 20 20 20 f2 73 65 74 5f 76 65 |))...1 .set_ve| 00001d30 72 73 69 6f 6e 28 73 61 76 65 25 2c 31 2c a4 66 |rsion(save%,1,.f| 00001d40 69 6e 64 6e 61 6d 65 28 62 6c 6f 63 6b 25 2b 34 |indname(block%+4| 00001d50 34 29 29 0d 0b 0e 0d f2 6f 70 65 6e 67 72 69 64 |4)).....opengrid| 00001d60 0d 0b 18 05 cd 0d 0b 22 05 e1 0d 0b 2c 04 0d 0b |......."....,...| 00001d70 36 0d dd 20 f2 72 65 6f 70 65 6e 0d 0b 40 2a c8 |6.. .reopen..@*.| 00001d80 99 20 22 57 69 6d 70 5f 52 65 64 72 61 77 57 69 |. "Wimp_RedrawWi| 00001d90 6e 64 6f 77 22 2c 2c 62 6c 6f 63 6b 25 20 b8 20 |ndow",,block% . | 00001da0 66 6c 61 67 25 0d 0b 4a 0c c8 95 20 66 6c 61 67 |flag%..J... flag| 00001db0 25 0d 0b 54 22 c8 99 20 22 57 69 6d 70 5f 42 6f |%..T".. "Wimp_Bo| 00001dc0 72 64 65 72 57 69 6e 64 6f 77 22 2c 2c 62 6c 6f |rderWindow",,blo| 00001dd0 63 6b 25 0d 0b 5e 2a c8 99 20 22 57 69 6d 70 5f |ck%..^*.. "Wimp_| 00001de0 47 65 74 52 65 63 74 61 6e 67 6c 65 22 2c 2c 62 |GetRectangle",,b| 00001df0 6c 6f 63 6b 25 20 b8 20 66 6c 61 67 25 0d 0b 68 |lock% . flag%..h| 00001e00 05 ce 0d 0b 72 05 e1 0d 0b 7c 04 0d 0b 86 2e dd |....r....|......| 00001e10 20 f2 63 68 65 63 6b 5f 6d 6f 75 73 65 28 6d 78 | .check_mouse(mx| 00001e20 25 2c 6d 79 25 2c 62 75 74 25 2c 68 6e 64 25 2c |%,my%,but%,hnd%,| 00001e30 69 63 6f 6e 68 6e 64 25 29 0d 0b 90 16 e7 20 68 |iconhnd%)..... h| 00001e40 6e 64 25 20 3d 20 69 6e 66 6f 25 20 8c 20 e1 0d |nd% = info% . ..| 00001e50 0b 9a 0d c8 8e 20 62 75 74 25 20 ca 0d 0b a4 0a |..... but% .....| 00001e60 c9 20 25 30 30 31 0d 0b ae 10 f2 73 6c 61 62 69 |. %001.....slabi| 00001e70 6e 69 63 6f 6e 73 0d 0b b8 0d c8 8e 20 68 6e 64 |nicons...... hnd| 00001e80 25 20 ca 0d 0b c2 29 c9 20 6e 65 77 77 6f 72 64 |% ....). newword| 00001e90 25 20 20 3a 20 f2 6e 65 77 77 6f 72 64 63 6c 69 |% : .newwordcli| 00001ea0 63 6b 28 69 63 6f 6e 68 6e 64 25 29 0d 0b cc 2e |ck(iconhnd%)....| 00001eb0 c9 20 6e 65 77 67 72 69 64 25 20 20 3a 20 f2 6e |. newgrid% : .n| 00001ec0 65 77 67 72 69 64 63 6c 69 63 6b 28 69 63 6f 6e |ewgridclick(icon| 00001ed0 68 6e 64 25 2c 62 75 74 25 29 0d 0b d6 2e c9 20 |hnd%,but%)..... | 00001ee0 6f 70 74 69 6f 6e 73 25 20 20 3a 20 f2 6f 70 74 |options% : .opt| 00001ef0 69 6f 6e 73 63 6c 69 63 6b 28 69 63 6f 6e 68 6e |ionsclick(iconhn| 00001f00 64 25 2c 62 75 74 25 29 0d 0b e0 2b c9 20 73 61 |d%,but%)...+. sa| 00001f10 76 65 25 20 20 20 20 20 3a 20 f2 73 61 76 65 63 |ve% : .savec| 00001f20 6c 69 63 6b 28 69 63 6f 6e 68 6e 64 25 2c 62 75 |lick(iconhnd%,bu| 00001f30 74 25 29 0d 0b ea 2f c9 20 73 61 76 65 74 65 78 |t%).../. savetex| 00001f40 74 25 20 3a 20 f2 73 61 76 65 74 65 78 74 63 6c |t% : .savetextcl| 00001f50 69 63 6b 28 69 63 6f 6e 68 6e 64 25 2c 62 75 74 |ick(iconhnd%,but| 00001f60 25 29 0d 0b f4 2d c9 20 72 65 6d 6f 76 65 25 20 |%)...-. remove% | 00001f70 20 20 3a 20 f2 72 65 6d 6f 76 65 63 6c 69 63 6b | : .removeclick| 00001f80 28 69 63 6f 6e 68 6e 64 25 2c 62 75 74 25 29 0d |(iconhnd%,but%).| 00001f90 0b fe 05 cb 0d 0c 08 11 f2 73 6c 61 62 6f 75 74 |.........slabout| 00001fa0 69 63 6f 6e 73 0d 0c 12 0a c9 20 25 30 31 30 0d |icons..... %010.| 00001fb0 0c 1c 0f e7 20 68 6e 64 25 3d 2d 32 20 8c 0d 0c |.... hnd%=-2 ...| 00001fc0 26 11 6d 65 6e 75 78 25 3d 6d 78 25 2d 36 34 0d |&.menux%=mx%-64.| 00001fd0 0c 30 13 6d 65 6e 75 79 25 20 3d 20 6d 65 6e 31 |.0.menuy% = men1| 00001fe0 79 25 0d 0c 3a 1c 6d 65 6e 68 65 69 67 68 74 25 |y%..:.menheight%| 00001ff0 20 3d 20 6d 65 6e 31 68 65 69 67 68 74 25 0d 0c | = men1height%..| 00002000 44 30 f2 72 65 5f 6f 70 65 6e 6d 65 6e 75 28 22 |D0.re_openmenu("| 00002010 57 6f 72 64 73 65 61 72 63 68 22 2c 6d 65 6e 75 |Wordsearch",menu| 00002020 78 25 2c 6d 65 6e 68 65 69 67 68 74 25 29 0d 0c |x%,menheight%)..| 00002030 4e 05 cc 0d 0c 58 60 e7 20 68 6e 64 25 20 3c 3e |N....X`. hnd% <>| 00002040 20 6f 70 74 69 6f 6e 73 25 20 80 20 68 6e 64 25 | options% . hnd%| 00002050 20 3c 3e 20 6e 65 77 67 72 69 64 25 20 80 20 68 | <> newgrid% . h| 00002060 6e 64 25 20 3c 3e 20 73 61 76 65 25 20 80 20 68 |nd% <> save% . h| 00002070 6e 64 25 20 3c 3e 20 73 61 76 65 74 65 78 74 25 |nd% <> savetext%| 00002080 20 80 20 68 6e 64 25 20 3c 3e 20 73 74 61 74 73 | . hnd% <> stats| 00002090 25 20 8c 0d 0c 62 13 6d 65 6e 75 78 25 20 3d 20 |% ...b.menux% = | 000020a0 6d 78 25 2d 36 34 0d 0c 6c 13 6d 65 6e 75 79 25 |mx%-64..l.menuy%| 000020b0 20 3d 20 6d 65 6e 32 79 25 0d 0c 76 2b f2 72 65 | = men2y%..v+.re| 000020c0 5f 6f 70 65 6e 6d 65 6e 75 28 22 20 57 6f 72 64 |_openmenu(" Word| 000020d0 73 65 61 72 63 68 20 22 2c 6d 65 6e 75 78 25 2c |search ",menux%,| 000020e0 6d 79 25 29 0d 0c 80 05 cd 0d 0c 8a 2d f4 20 53 |my%)........-. S| 000020f0 70 61 63 65 73 20 69 6e 20 6c 69 6e 65 20 61 62 |paces in line ab| 00002100 6f 76 65 20 61 72 65 20 56 45 52 59 20 69 6d 70 |ove are VERY imp| 00002110 6f 72 74 61 6e 74 0d 0c 94 05 cd 0d 0c 9e 0a c9 |ortant..........| 00002120 20 25 31 30 30 0d 0c a8 10 f2 73 6c 61 62 69 6e | %100.....slabin| 00002130 69 63 6f 6e 73 0d 0c b2 0d c8 8e 20 68 6e 64 25 |icons...... hnd%| 00002140 20 ca 0d 0c bc 1f c9 20 2d 32 20 20 20 20 20 20 | ...... -2 | 00002150 20 20 3a 20 f2 69 63 6f 6e 62 61 72 63 6c 69 63 | : .iconbarclic| 00002160 6b 0d 0c c6 29 c9 20 6e 65 77 77 6f 72 64 25 20 |k...). newword% | 00002170 20 3a 20 f2 6e 65 77 77 6f 72 64 63 6c 69 63 6b | : .newwordclick| 00002180 28 69 63 6f 6e 68 6e 64 25 29 0d 0c d0 2e c9 20 |(iconhnd%)..... | 00002190 6e 65 77 67 72 69 64 25 20 20 3a 20 f2 6e 65 77 |newgrid% : .new| 000021a0 67 72 69 64 63 6c 69 63 6b 28 69 63 6f 6e 68 6e |gridclick(iconhn| 000021b0 64 25 2c 62 75 74 25 29 0d 0c da 2e c9 20 6f 70 |d%,but%)..... op| 000021c0 74 69 6f 6e 73 25 20 20 3a 20 f2 6f 70 74 69 6f |tions% : .optio| 000021d0 6e 73 63 6c 69 63 6b 28 69 63 6f 6e 68 6e 64 25 |nsclick(iconhnd%| 000021e0 2c 62 75 74 25 29 0d 0c e4 2b c9 20 73 61 76 65 |,but%)...+. save| 000021f0 25 20 20 20 20 20 3a 20 f2 73 61 76 65 63 6c 69 |% : .savecli| 00002200 63 6b 28 69 63 6f 6e 68 6e 64 25 2c 62 75 74 25 |ck(iconhnd%,but%| 00002210 29 0d 0c ee 2f c9 20 73 61 76 65 74 65 78 74 25 |).../. savetext%| 00002220 20 3a 20 f2 73 61 76 65 74 65 78 74 63 6c 69 63 | : .savetextclic| 00002230 6b 28 69 63 6f 6e 68 6e 64 25 2c 62 75 74 25 29 |k(iconhnd%,but%)| 00002240 0d 0c f8 2d c9 20 72 65 6d 6f 76 65 25 20 20 20 |...-. remove% | 00002250 3a 20 f2 72 65 6d 6f 76 65 63 6c 69 63 6b 28 69 |: .removeclick(i| 00002260 63 6f 6e 68 6e 64 25 2c 62 75 74 25 29 0d 0d 02 |conhnd%,but%)...| 00002270 05 cb 0d 0d 0c 11 f2 73 6c 61 62 6f 75 74 69 63 |.......slaboutic| 00002280 6f 6e 73 0d 0d 16 12 c9 20 26 34 30 20 3a 20 f4 |ons..... &40 : .| 00002290 20 64 72 61 67 0d 0d 20 0d c8 8e 20 68 6e 64 25 | drag.. ... hnd%| 000022a0 20 ca 0d 0d 2a 27 c9 20 73 61 76 65 25 20 3a 20 | ...*'. save% : | 000022b0 f2 73 61 76 65 63 6c 69 63 6b 28 69 63 6f 6e 68 |.saveclick(iconh| 000022c0 6e 64 25 2c 62 75 74 25 29 0d 0d 34 2f c9 20 73 |nd%,but%)..4/. s| 000022d0 61 76 65 74 65 78 74 25 20 3a 20 f2 73 61 76 65 |avetext% : .save| 000022e0 74 65 78 74 63 6c 69 63 6b 28 69 63 6f 6e 68 6e |textclick(iconhn| 000022f0 64 25 2c 62 75 74 25 29 0d 0d 3e 05 cb 0d 0d 48 |d%,but%)..>....H| 00002300 05 cb 0d 0d 52 05 e1 0d 0d 5c 04 0d 0d 66 12 dd |....R....\...f..| 00002310 20 f2 73 6c 61 62 69 6e 69 63 6f 6e 73 0d 0d 70 | .slabinicons..p| 00002320 26 e7 20 68 6e 64 25 20 3d 20 67 72 69 64 25 20 |&. hnd% = grid% | 00002330 84 20 68 6e 64 25 20 3d 20 77 6f 72 64 73 25 20 |. hnd% = words% | 00002340 8c 20 e1 0d 0d 7a 24 c8 99 20 22 57 69 6d 70 5f |. ...z$.. "Wimp_| 00002350 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 6f 22 2c |GetPointerInfo",| 00002360 2c 62 6c 6f 63 6b 25 0d 0d 84 20 c8 99 20 22 57 |,block%... .. "W| 00002370 69 6d 70 5f 42 6f 72 64 65 72 49 63 6f 6e 22 2c |imp_BorderIcon",| 00002380 2c 62 6c 6f 63 6b 25 0d 0d 8e 05 e1 0d 0d 98 04 |,block%.........| 00002390 0d 0d a2 13 dd 20 f2 73 6c 61 62 6f 75 74 69 63 |..... .slaboutic| 000023a0 6f 6e 73 0d 0d ac 26 e7 20 68 6e 64 25 20 3d 20 |ons...&. hnd% = | 000023b0 67 72 69 64 25 20 84 20 68 6e 64 25 20 3d 20 77 |grid% . hnd% = w| 000023c0 6f 72 64 73 25 20 8c 20 e1 0d 0d b6 24 c8 99 20 |ords% . ....$.. | 000023d0 22 57 69 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 |"Wimp_GetPointer| 000023e0 49 6e 66 6f 22 2c 2c 62 6c 6f 63 6b 25 0d 0d c0 |Info",,block%...| 000023f0 10 62 6c 6f 63 6b 25 21 38 20 3d 20 30 0d 0d ca |.block%!8 = 0...| 00002400 20 c8 99 20 22 57 69 6d 70 5f 42 6f 72 64 65 72 | .. "Wimp_Border| 00002410 49 63 6f 6e 22 2c 2c 62 6c 6f 63 6b 25 0d 0d d4 |Icon",,block%...| 00002420 05 e1 0d 0d de 04 0d 0d e8 21 dd 20 f2 72 65 6d |.........!. .rem| 00002430 6f 76 65 63 6c 69 63 6b 28 69 63 6f 6e 68 6e 64 |oveclick(iconhnd| 00002440 25 2c 62 75 74 25 29 0d 0d f2 15 e7 20 69 63 6f |%,but%)..... ico| 00002450 6e 68 6e 64 25 20 3c 3e 20 31 20 e1 0d 0d fc 1e |nhnd% <> 1 .....| 00002460 f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 72 65 6d |.set_version(rem| 00002470 6f 76 65 25 2c 30 2c 22 22 29 0d 0e 06 18 f2 73 |ove%,0,"").....s| 00002480 65 74 63 61 72 65 74 28 72 65 6d 6f 76 65 25 2c |etcaret(remove%,| 00002490 30 29 0d 0e 10 29 f2 72 65 6d 6f 76 65 28 a4 74 |0)...).remove(.t| 000024a0 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c 65 28 |extfromwritable(| 000024b0 72 65 6d 6f 76 65 25 2c 30 29 29 0d 0e 1a 05 e1 |remove%,0)).....| 000024c0 0d 0e 24 04 0d 0e 2e 13 dd 20 f2 69 63 6f 6e 62 |..$...... .iconb| 000024d0 61 72 63 6c 69 63 6b 0d 0e 38 0c ea 20 64 75 6d |arclick..8.. dum| 000024e0 6d 79 25 0d 0e 42 34 e7 20 67 72 69 64 64 65 66 |my%..B4. griddef| 000024f0 69 6e 65 64 25 20 8c 20 f2 6f 70 65 6e 67 72 69 |ined% . .opengri| 00002500 64 20 8b 20 64 75 6d 6d 79 25 3d a4 6f 70 65 6e |d . dummy%=.open| 00002510 6e 65 77 67 72 69 64 0d 0e 4c 05 e1 0d 0e 56 04 |newgrid..L....V.| 00002520 0d 0e 60 1d dd 20 f2 6e 65 77 77 6f 72 64 63 6c |..`.. .newwordcl| 00002530 69 63 6b 28 69 63 6f 6e 68 6e 64 25 29 0d 0e 6a |ick(iconhnd%)..j| 00002540 21 e7 20 69 63 6f 6e 68 6e 64 25 20 3d 20 31 20 |!. iconhnd% = 1 | 00002550 8c 20 f2 63 61 6c 6c 6e 65 77 77 6f 72 64 0d 0e |. .callnewword..| 00002560 74 05 e1 0d 0e 7e 04 0d 0e 88 12 dd 20 f2 63 61 |t....~...... .ca| 00002570 6c 6c 6e 65 77 77 6f 72 64 0d 0e 92 0c ea 20 64 |llnewword..... d| 00002580 75 6d 6d 79 24 0d 0e 9c 37 64 75 6d 6d 79 24 3d |ummy$...7dummy$=| 00002590 a4 6e 65 77 5f 77 6f 72 64 28 22 49 22 2c a4 74 |.new_word("I",.t| 000025a0 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c 65 28 |extfromwritable(| 000025b0 6e 65 77 77 6f 72 64 25 2c 30 29 29 0d 0e a6 05 |newword%,0))....| 000025c0 e1 0d 0e b0 04 0d 0e ba 17 dd 20 f2 63 6c 65 61 |.......... .clea| 000025d0 72 6e 65 77 77 6f 72 64 69 63 6f 6e 0d 0e c4 1f |rnewwordicon....| 000025e0 f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 6e 65 77 |.set_version(new| 000025f0 77 6f 72 64 25 2c 30 2c 22 22 29 0d 0e ce 19 f2 |word%,0,"").....| 00002600 73 65 74 63 61 72 65 74 28 6e 65 77 77 6f 72 64 |setcaret(newword| 00002610 25 2c 30 29 0d 0e d8 05 e1 0d 0e e2 04 0d 0e ec |%,0)............| 00002620 22 dd 20 f2 6e 65 77 67 72 69 64 63 6c 69 63 6b |". .newgridclick| 00002630 28 69 63 6f 6e 68 6e 64 25 2c 62 75 74 25 29 0d |(iconhnd%,but%).| 00002640 0e f6 14 e7 20 69 63 6f 6e 68 6e 64 25 20 3d 20 |.... iconhnd% = | 00002650 34 20 8c 0d 0f 00 11 f2 63 68 65 63 6b 6e 65 77 |4 ......checknew| 00002660 67 72 69 64 0d 0f 0a 11 f2 73 6c 61 62 6f 75 74 |grid.....slabout| 00002670 69 63 6f 6e 73 0d 0f 14 28 e7 20 62 75 74 25 20 |icons...(. but% | 00002680 3d 20 34 20 8c 20 f2 63 6c 6f 73 65 6f 6e 63 6c |= 4 . .closeoncl| 00002690 69 63 6b 28 6e 65 77 67 72 69 64 25 29 0d 0f 1e |ick(newgrid%)...| 000026a0 05 cd 0d 0f 28 05 e1 0d 0f 32 04 0d 0f 3c 13 dd |....(....2...<..| 000026b0 20 f2 63 68 65 63 6b 6e 65 77 67 72 69 64 0d 0f | .checknewgrid..| 000026c0 46 cb e7 20 67 72 69 64 64 65 66 69 6e 65 64 25 |F.. griddefined%| 000026d0 20 3d 20 a3 20 84 20 63 68 61 6e 67 65 64 25 20 | = . . changed% | 000026e0 3d 20 a3 20 8c 20 f2 6e 65 77 5f 67 72 69 64 20 |= . . .new_grid | 000026f0 8b 20 e7 20 a4 79 6f 72 6e 28 22 54 68 69 73 20 |. . .yorn("This | 00002700 77 69 6c 6c 20 65 72 61 73 65 20 74 68 65 20 67 |will erase the g| 00002710 72 69 64 20 79 6f 75 20 68 61 76 65 20 61 6c 72 |rid you have alr| 00002720 65 61 64 79 20 6d 61 64 65 2e 20 43 6c 69 63 6b |eady made. Click| 00002730 20 4f 4b 20 74 6f 20 6d 61 6b 65 20 61 20 6e 65 | OK to make a ne| 00002740 77 20 67 72 69 64 2c 20 63 6c 69 63 6b 20 43 41 |w grid, click CA| 00002750 4e 43 45 4c 20 74 6f 20 6b 65 65 70 20 74 68 65 |NCEL to keep the| 00002760 20 67 72 69 64 20 79 6f 75 20 68 61 76 65 20 61 | grid you have a| 00002770 6c 72 65 61 64 79 20 67 6f 74 2e 22 29 20 8c 20 |lready got.") . | 00002780 f2 6e 65 77 5f 67 72 69 64 0d 0f 50 05 e1 0d 0f |.new_grid..P....| 00002790 5a 04 0d 0f 64 22 dd 20 f2 6f 70 74 69 6f 6e 73 |Z...d". .options| 000027a0 63 6c 69 63 6b 28 69 63 6f 6e 68 6e 64 25 2c 62 |click(iconhnd%,b| 000027b0 75 74 25 29 0d 0f 6e 11 c8 8e 20 69 63 6f 6e 68 |ut%)..n... iconh| 000027c0 6e 64 25 20 ca 0d 0f 78 1e c9 20 31 20 3a 20 62 |nd% ...x.. 1 : b| 000027d0 69 61 73 25 20 3d 20 a4 73 77 61 70 28 62 69 61 |ias% = .swap(bia| 000027e0 73 25 29 0d 0f 82 2e c9 20 32 20 3a 20 77 6f 72 |s%)..... 2 : wor| 000027f0 64 70 61 72 74 66 69 6c 6c 25 20 3d 20 a4 73 77 |dpartfill% = .sw| 00002800 61 70 28 77 6f 72 64 70 61 72 74 66 69 6c 6c 25 |ap(wordpartfill%| 00002810 29 0d 0f 8c 2a c9 20 33 20 3a 20 6c 65 74 74 65 |)...*. 3 : lette| 00002820 72 66 69 6c 6c 25 20 3d 20 a4 73 77 61 70 28 6c |rfill% = .swap(l| 00002830 65 74 74 65 72 66 69 6c 6c 25 29 0d 0f 96 2a c9 |etterfill%)...*.| 00002840 20 35 20 3a 20 62 61 63 6b 67 72 6f 75 6e 64 25 | 5 : background%| 00002850 20 3d 20 a4 73 77 61 70 28 62 61 63 6b 67 72 6f | = .swap(backgro| 00002860 75 6e 64 25 29 0d 0f a0 1c c9 20 34 20 3a 20 f2 |und%)..... 4 : .| 00002870 73 61 76 65 6f 70 74 69 6f 6e 73 28 62 75 74 25 |saveoptions(but%| 00002880 29 0d 0f aa 05 cb 0d 0f b4 05 e1 0d 0f be 04 0d |)...............| 00002890 0f c8 14 dd 20 a4 73 77 61 70 28 73 77 61 70 65 |.... .swap(swape| 000028a0 65 25 29 0d 0f d2 19 e7 20 73 77 61 70 65 65 25 |e%)..... swapee%| 000028b0 3d b9 20 8c 20 3d a3 20 8b 20 3d b9 0d 0f dc 04 |=. . =. . =.....| 000028c0 0d 0f e6 1f dd 20 f2 73 61 76 65 63 6c 69 63 6b |..... .saveclick| 000028d0 28 69 63 6f 6e 68 6e 64 25 2c 62 75 74 25 29 0d |(iconhnd%,but%).| 000028e0 0f f0 11 c8 8e 20 69 63 6f 6e 68 6e 64 25 20 ca |..... iconhnd% .| 000028f0 0d 0f fa 07 c9 20 30 0d 10 04 12 e7 20 62 75 74 |..... 0..... but| 00002900 25 20 3d 20 26 34 30 20 8c 0d 10 0e 12 64 72 61 |% = &40 .....dra| 00002910 67 24 20 3d 20 22 6e 6f 72 6d 22 0d 10 18 14 f2 |g$ = "norm".....| 00002920 64 72 61 67 69 63 6f 6e 28 73 61 76 65 25 29 0d |dragicon(save%).| 00002930 10 22 05 cd 0d 10 2c 07 c9 20 32 0d 10 36 2c e7 |."....,.. 2..6,.| 00002940 20 a7 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 61 | ..textfromwrita| 00002950 62 6c 65 28 73 61 76 65 25 2c 31 29 2c 22 3a 22 |ble(save%,1),":"| 00002960 29 20 3e 20 30 20 8c 0d 10 40 29 f2 73 61 76 65 |) > 0 ...@).save| 00002970 67 72 69 64 28 a4 74 65 78 74 66 72 6f 6d 77 72 |grid(.textfromwr| 00002980 69 74 61 62 6c 65 28 73 61 76 65 25 2c 31 29 29 |itable(save%,1))| 00002990 0d 10 4a 28 e7 20 62 75 74 25 20 3d 20 25 31 30 |..J(. but% = %10| 000029a0 30 20 8c 20 f2 63 6c 6f 73 65 6f 6e 63 6c 69 63 |0 . .closeonclic| 000029b0 6b 28 73 61 76 65 25 29 0d 10 54 05 cc 0d 10 5e |k(save%)..T....^| 000029c0 12 f2 70 72 6f 74 65 73 74 61 74 6e 61 6d 65 0d |..protestatname.| 000029d0 10 68 05 cd 0d 10 72 05 cb 0d 10 7c 05 e1 0d 10 |.h....r....|....| 000029e0 86 04 0d 10 90 23 dd 20 f2 73 61 76 65 74 65 78 |.....#. .savetex| 000029f0 74 63 6c 69 63 6b 28 69 63 6f 6e 68 6e 64 25 2c |tclick(iconhnd%,| 00002a00 62 75 74 25 29 0d 10 9a 11 c8 8e 20 69 63 6f 6e |but%)...... icon| 00002a10 68 6e 64 25 20 ca 0d 10 a4 07 c9 20 30 0d 10 ae |hnd% ...... 0...| 00002a20 12 e7 20 62 75 74 25 20 3d 20 26 34 30 20 8c 0d |.. but% = &40 ..| 00002a30 10 b8 12 64 72 61 67 24 20 3d 20 22 74 65 78 74 |...drag$ = "text| 00002a40 22 0d 10 c2 18 f2 64 72 61 67 69 63 6f 6e 28 73 |".....dragicon(s| 00002a50 61 76 65 74 65 78 74 25 29 0d 10 cc 05 cd 0d 10 |avetext%).......| 00002a60 d6 07 c9 20 32 0d 10 e0 30 e7 20 a7 a4 74 65 78 |... 2...0. ..tex| 00002a70 74 66 72 6f 6d 77 72 69 74 61 62 6c 65 28 73 61 |tfromwritable(sa| 00002a80 76 65 74 65 78 74 25 2c 31 29 2c 22 3a 22 29 20 |vetext%,1),":") | 00002a90 3e 20 30 20 8c 0d 10 ea 2f f2 73 61 76 65 61 73 |> 0 ..../.saveas| 00002aa0 74 65 78 74 28 a4 74 65 78 74 66 72 6f 6d 77 72 |text(.textfromwr| 00002ab0 69 74 61 62 6c 65 28 73 61 76 65 74 65 78 74 25 |itable(savetext%| 00002ac0 2c 31 29 29 0d 10 f4 2c e7 20 62 75 74 25 20 3d |,1))...,. but% =| 00002ad0 20 25 31 30 30 20 8c 20 f2 63 6c 6f 73 65 6f 6e | %100 . .closeon| 00002ae0 63 6c 69 63 6b 28 73 61 76 65 74 65 78 74 25 29 |click(savetext%)| 00002af0 0d 10 fe 05 cc 0d 11 08 12 f2 70 72 6f 74 65 73 |..........protes| 00002b00 74 61 74 6e 61 6d 65 0d 11 12 05 cd 0d 11 1c 05 |tatname.........| 00002b10 cb 0d 11 26 05 e1 0d 11 30 04 0d 11 3a 18 dd 20 |...&....0...:.. | 00002b20 f2 64 72 61 67 69 63 6f 6e 28 77 69 6e 68 6e 64 |.dragicon(winhnd| 00002b30 25 29 0d 11 44 22 f4 20 44 72 61 67 20 73 61 76 |%)..D". Drag sav| 00002b40 65 20 69 63 6f 6e 20 6f 75 74 20 6f 66 20 77 69 |e icon out of wi| 00002b50 6e 64 6f 77 0d 11 4e 19 ea 20 77 69 6e 62 61 73 |ndow..N.. winbas| 00002b60 65 78 25 2c 77 69 6e 62 61 73 65 79 25 0d 11 58 |ex%,winbasey%..X| 00002b70 16 21 6e 65 77 62 6c 6f 63 6b 25 3d 77 69 6e 68 |.!newblock%=winh| 00002b80 6e 64 25 0d 11 62 27 c8 99 20 22 57 69 6d 70 5f |nd%..b'.. "Wimp_| 00002b90 47 65 74 57 69 6e 64 6f 77 53 74 61 74 65 22 2c |GetWindowState",| 00002ba0 2c 6e 65 77 62 6c 6f 63 6b 25 0d 11 6c 2a 77 69 |,newblock%..l*wi| 00002bb0 6e 62 61 73 65 78 25 20 3d 20 6e 65 77 62 6c 6f |nbasex% = newblo| 00002bc0 63 6b 25 21 34 20 2d 20 6e 65 77 62 6c 6f 63 6b |ck%!4 - newblock| 00002bd0 25 21 32 30 0d 11 76 2b 77 69 6e 62 61 73 65 79 |%!20..v+winbasey| 00002be0 25 20 3d 20 6e 65 77 62 6c 6f 63 6b 25 21 31 36 |% = newblock%!16| 00002bf0 20 2d 20 6e 65 77 62 6c 6f 63 6b 25 21 32 34 0d | - newblock%!24.| 00002c00 11 80 13 6e 65 77 62 6c 6f 63 6b 25 21 34 20 3d |...newblock%!4 =| 00002c10 20 30 0d 11 8a 25 c8 99 20 22 57 69 6d 70 5f 47 | 0...%.. "Wimp_G| 00002c20 65 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 6e 65 |etIconState",,ne| 00002c30 77 62 6c 6f 63 6b 25 0d 11 94 13 6e 65 77 62 6c |wblock%....newbl| 00002c40 6f 63 6b 25 21 34 20 3d 20 35 0d 11 9e 1c 6e 65 |ock%!4 = 5....ne| 00002c50 77 62 6c 6f 63 6b 25 21 38 20 2b 3d 20 77 69 6e |wblock%!8 += win| 00002c60 62 61 73 65 78 25 0d 11 a8 1d 6e 65 77 62 6c 6f |basex%....newblo| 00002c70 63 6b 25 21 31 32 20 2b 3d 20 77 69 6e 62 61 73 |ck%!12 += winbas| 00002c80 65 79 25 0d 11 b2 1d 6e 65 77 62 6c 6f 63 6b 25 |ey%....newblock%| 00002c90 21 31 36 20 2b 3d 20 77 69 6e 62 61 73 65 78 25 |!16 += winbasex%| 00002ca0 0d 11 bc 1d 6e 65 77 62 6c 6f 63 6b 25 21 32 30 |....newblock%!20| 00002cb0 20 2b 3d 20 77 69 6e 62 61 73 65 79 25 0d 11 c6 | += winbasey%...| 00002cc0 14 6e 65 77 62 6c 6f 63 6b 25 21 32 34 20 3d 20 |.newblock%!24 = | 00002cd0 30 0d 11 d0 14 6e 65 77 62 6c 6f 63 6b 25 21 32 |0....newblock%!2| 00002ce0 38 20 3d 20 30 0d 11 da 46 6e 65 77 62 6c 6f 63 |8 = 0...Fnewbloc| 00002cf0 6b 25 21 33 32 20 3d 20 39 39 39 39 39 20 3a 20 |k%!32 = 99999 : | 00002d00 f4 20 43 61 6e 27 74 20 62 65 20 62 6f 74 68 65 |. Can't be bothe| 00002d10 72 65 64 20 74 6f 20 66 69 6e 64 20 73 69 7a 65 |red to find size| 00002d20 20 6f 66 20 73 63 72 65 65 6e 2e 0d 11 e4 18 6e | of screen.....n| 00002d30 65 77 62 6c 6f 63 6b 25 21 33 36 20 3d 20 39 39 |ewblock%!36 = 99| 00002d40 39 39 39 0d 11 ee 20 c8 99 20 22 57 69 6d 70 5f |999... .. "Wimp_| 00002d50 44 72 61 67 42 6f 78 22 2c 2c 6e 65 77 62 6c 6f |DragBox",,newblo| 00002d60 63 6b 25 0d 11 f8 05 e1 0d 12 02 04 0d 12 0c 19 |ck%.............| 00002d70 dd 20 f2 63 6c 6f 73 65 6f 6e 63 6c 69 63 6b 28 |. .closeonclick(| 00002d80 68 6e 64 25 29 0d 12 16 11 f2 73 6c 61 62 6f 75 |hnd%).....slabou| 00002d90 74 69 63 6f 6e 73 0d 12 20 15 21 73 74 61 74 65 |ticons.. .!state| 00002da0 62 6c 6f 63 6b 25 3d 68 6e 64 25 0d 12 2a 29 c8 |block%=hnd%..*).| 00002db0 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f |. "Wimp_GetWindo| 00002dc0 77 53 74 61 74 65 22 2c 2c 73 74 61 74 65 62 6c |wState",,statebl| 00002dd0 6f 63 6b 25 0d 12 34 26 c8 99 20 22 57 69 6d 70 |ock%..4&.. "Wimp| 00002de0 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 22 2c 2c 73 |_CloseWindow",,s| 00002df0 74 61 74 65 62 6c 6f 63 6b 25 0d 12 3e 05 e1 0d |tateblock%..>...| 00002e00 12 48 04 0d 12 52 20 dd 20 f2 63 72 65 61 74 65 |.H...R . .create| 00002e10 5f 6d 65 6e 75 28 74 69 74 6c 65 24 2c 78 25 2c |_menu(title$,x%,| 00002e20 79 25 29 0d 12 5c 0d 6d 65 6e 75 79 25 3d 79 25 |y%)..\.menuy%=y%| 00002e30 0d 12 66 1e f2 62 75 69 6c 64 5f 6d 65 6e 75 28 |..f..build_menu(| 00002e40 74 69 74 6c 65 24 2c 6d 65 6e 75 79 25 29 0d 12 |title$,menuy%)..| 00002e50 70 10 6d 65 6e 75 78 25 3d 78 25 2d 36 34 0d 12 |p.menux%=x%-64..| 00002e60 7a 0d 6d 65 6e 75 79 25 3d 79 25 0d 12 84 2c c8 |z.menuy%=y%...,.| 00002e70 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 4d 65 |. "Wimp_CreateMe| 00002e80 6e 75 22 2c 2c 62 6c 6b 25 2c 6d 65 6e 75 78 25 |nu",,blk%,menux%| 00002e90 2c 6d 65 6e 75 79 25 0d 12 8e 05 e1 0d 12 98 04 |,menuy%.........| 00002ea0 0d 12 a2 22 dd 20 f2 63 72 65 61 74 65 5f 69 63 |...". .create_ic| 00002eb0 6f 6e 5f 6d 65 6e 75 28 74 69 74 6c 65 24 2c 78 |on_menu(title$,x| 00002ec0 25 29 0d 12 ac 0c 6d 65 6e 75 79 25 3d 30 0d 12 |%)....menuy%=0..| 00002ed0 b6 1e f2 62 75 69 6c 64 5f 6d 65 6e 75 28 74 69 |...build_menu(ti| 00002ee0 74 6c 65 24 2c 6d 65 6e 75 79 25 29 0d 12 c0 10 |tle$,menuy%)....| 00002ef0 6d 65 6e 75 78 25 3d 78 25 2d 36 34 0d 12 ca 2c |menux%=x%-64...,| 00002f00 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 4d |.. "Wimp_CreateM| 00002f10 65 6e 75 22 2c 2c 62 6c 6b 25 2c 6d 65 6e 75 78 |enu",,blk%,menux| 00002f20 25 2c 6d 65 6e 75 79 25 0d 12 d4 05 e1 0d 12 de |%,menuy%........| 00002f30 04 0d 12 e8 23 dd 20 f2 62 75 69 6c 64 5f 6d 65 |....#. .build_me| 00002f40 6e 75 28 74 69 74 6c 65 24 2c f8 20 68 65 69 67 |nu(title$,. heig| 00002f50 68 74 25 29 0d 12 f2 41 ea 20 6f 66 66 73 65 74 |ht%)...A. offset| 00002f60 25 2c 69 25 2c 6d 65 6e 75 49 74 65 6d 73 25 2c |%,i%,menuItems%,| 00002f70 64 6f 74 73 25 2c 77 69 6d 70 66 6c 61 67 73 2c |dots%,wimpflags,| 00002f80 66 6c 61 67 73 2c 70 74 72 25 2c 6e 61 6d 65 24 |flags,ptr%,name$| 00002f90 2c 70 74 72 24 0d 12 fc 29 6f 66 66 73 65 74 25 |,ptr$...)offset%| 00002fa0 3d a4 66 69 6e 64 5f 6d 65 6e 75 28 74 69 74 6c |=.find_menu(titl| 00002fb0 65 24 2c 6d 65 6e 75 5f 64 61 74 61 25 29 0d 13 |e$,menu_data%)..| 00002fc0 06 2d e7 20 6f 66 66 73 65 74 25 3d b9 20 8c 20 |.-. offset%=. . | 00002fd0 85 20 34 32 2c 22 43 61 6e 27 74 20 66 69 6e 64 |. 42,"Can't find| 00002fe0 20 6d 65 6e 75 20 64 61 74 61 22 0d 13 10 2b 62 | menu data"...+b| 00002ff0 6c 6b 24 3d a4 67 65 74 5f 6d 65 6e 75 5f 69 74 |lk$=.get_menu_it| 00003000 65 6d 28 6d 65 6e 75 5f 64 61 74 61 25 2c 6f 66 |em(menu_data%,of| 00003010 66 73 65 74 25 29 0d 13 1a 10 62 6c 6b 25 3d a0 |fset%)....blk%=.| 00003020 28 62 6c 6b 24 29 0d 13 24 15 24 62 6c 6b 25 3d |(blk$)..$.$blk%=| 00003030 c0 74 69 74 6c 65 24 2c 31 32 29 0d 13 2e 0d 62 |.title$,12)....b| 00003040 6c 6b 25 3f 31 32 3d 37 0d 13 38 0d 62 6c 6b 25 |lk%?12=7..8.blk%| 00003050 3f 31 33 3d 32 0d 13 42 0d 62 6c 6b 25 3f 31 34 |?13=2..B.blk%?14| 00003060 3d 37 0d 13 4c 0d 62 6c 6b 25 3f 31 35 3d 30 0d |=7..L.blk%?15=0.| 00003070 13 56 1b 62 6c 6b 25 21 31 36 3d 32 30 30 20 20 |.V.blk%!16=200 | 00003080 3a 20 20 f4 20 57 69 64 74 68 0d 13 60 0e 62 6c |: . Width..`.bl| 00003090 6b 25 21 32 30 3d 34 34 0d 13 6a 0d 62 6c 6b 25 |k%!20=44..j.blk%| 000030a0 21 32 34 3d 30 0d 13 74 09 69 25 3d 32 38 0d 13 |!24=0..t.i%=28..| 000030b0 7e 10 6d 65 6e 75 49 74 65 6d 73 25 3d 30 0d 13 |~.menuItems%=0..| 000030c0 88 0b 64 6f 74 73 25 3d 30 0d 13 92 3a c8 95 20 |..dots%=0...:.. | 000030d0 6d 65 6e 75 5f 64 61 74 61 25 3f 6f 66 66 73 65 |menu_data%?offse| 000030e0 74 25 3c 3e 97 22 7e 22 20 80 20 6d 65 6e 75 5f |t%<>."~" . menu_| 000030f0 64 61 74 61 25 3f 6f 66 66 73 65 74 25 3c 3e 97 |data%?offset%<>.| 00003100 22 5e 22 0d 13 9c 0e f2 6d 65 6e 75 5f 69 74 65 |"^".....menu_ite| 00003110 6d 0d 13 a6 4c e7 20 c2 6e 61 6d 65 24 2c 31 29 |m...L. .name$,1)| 00003120 3d 22 40 22 20 8c 20 6e 61 6d 65 24 3d c0 6e 61 |="@" . name$=.na| 00003130 6d 65 24 2c a9 6e 61 6d 65 24 2d 31 29 3a 70 74 |me$,.name$-1):pt| 00003140 72 24 3d a4 62 75 69 6c 64 5f 73 75 62 6d 65 6e |r$=.build_submen| 00003150 75 28 6e 61 6d 65 24 2c 70 6f 73 25 29 0d 13 b0 |u(name$,pos%)...| 00003160 15 e7 20 28 66 6c 61 67 73 20 80 20 34 29 3d 34 |.. (flags . 4)=4| 00003170 20 8c 0d 13 ba 15 69 6e 73 74 72 25 3d a7 70 74 | .....instr%=.pt| 00003180 72 24 2c 22 2c 22 29 0d 13 c4 23 62 6c 6b 25 21 |r$,",")...#blk%!| 00003190 28 69 25 2b 31 32 29 3d a0 28 c0 70 74 72 24 2c |(i%+12)=.(.ptr$,| 000031a0 69 6e 73 74 72 25 2d 31 29 29 0d 13 ce 18 70 74 |instr%-1))....pt| 000031b0 72 24 3d c1 70 74 72 24 2c 69 6e 73 74 72 25 2b |r$=.ptr$,instr%+| 000031c0 31 29 0d 13 d8 15 69 6e 73 74 72 25 3d a7 70 74 |1)....instr%=.pt| 000031d0 72 24 2c 22 2c 22 29 0d 13 e2 23 62 6c 6b 25 21 |r$,",")...#blk%!| 000031e0 28 69 25 2b 31 36 29 3d a0 28 c0 70 74 72 24 2c |(i%+16)=.(.ptr$,| 000031f0 69 6e 73 74 72 25 2d 31 29 29 0d 13 ec 18 70 74 |instr%-1))....pt| 00003200 72 24 3d c1 70 74 72 24 2c 69 6e 73 74 72 25 2b |r$=.ptr$,instr%+| 00003210 31 29 0d 13 f6 18 62 6c 6b 25 21 28 69 25 2b 32 |1)....blk%!(i%+2| 00003220 30 29 3d a0 28 70 74 72 24 29 0d 14 00 1d 77 69 |0)=.(ptr$)....wi| 00003230 6d 70 66 6c 61 67 73 3d 77 69 6d 70 66 6c 61 67 |mpflags=wimpflag| 00003240 73 20 84 20 32 5e 38 0d 14 0a 0b 70 74 72 25 3d |s . 2^8....ptr%=| 00003250 2d 31 0d 14 14 28 24 28 62 6c 6b 25 21 28 69 25 |-1...($(blk%!(i%| 00003260 2b 31 32 29 29 3d c0 6e 61 6d 65 24 2c 62 6c 6b |+12))=.name$,blk| 00003270 25 21 28 69 25 2b 32 30 29 29 0d 14 1e 05 cc 0d |%!(i%+20))......| 00003280 14 28 1c 24 28 62 6c 6b 25 2b 69 25 2b 31 32 29 |.(.$(blk%+i%+12)| 00003290 3d c0 6e 61 6d 65 24 2c 31 32 29 0d 14 32 10 70 |=.name$,12)..2.p| 000032a0 74 72 25 3d a0 28 70 74 72 24 29 0d 14 3c 05 cd |tr%=.(ptr$)..<..| 000032b0 0d 14 46 11 62 6c 6b 25 21 69 25 3d 66 6c 61 67 |..F.blk%!i%=flag| 000032c0 73 0d 14 50 14 62 6c 6b 25 21 28 69 25 2b 34 29 |s..P.blk%!(i%+4)| 000032d0 3d 70 74 72 25 0d 14 5a 19 62 6c 6b 25 21 28 69 |=ptr%..Z.blk%!(i| 000032e0 25 2b 38 29 3d 77 69 6d 70 66 6c 61 67 73 0d 14 |%+8)=wimpflags..| 000032f0 64 0c 69 25 3d 69 25 2b 32 34 0d 14 6e 11 6d 65 |d.i%=i%+24..n.me| 00003300 6e 75 49 74 65 6d 73 25 2b 3d 31 0d 14 78 05 ce |nuItems%+=1..x..| 00003310 0d 14 82 29 68 65 69 67 68 74 25 3d 39 36 2b 28 |...)height%=96+(| 00003320 6d 65 6e 75 49 74 65 6d 73 25 2a 34 34 29 2b 28 |menuItems%*44)+(| 00003330 64 6f 74 73 25 2a 32 34 29 0d 14 8c 1c 63 75 72 |dots%*24)....cur| 00003340 72 65 6e 74 5f 6d 65 6e 75 24 3d c0 24 62 6c 6b |rent_menu$=.$blk| 00003350 25 2c 31 32 29 0d 14 96 05 e1 0d 14 a0 04 0d 14 |%,12)...........| 00003360 aa 10 dd 20 f2 6d 65 6e 75 5f 69 74 65 6d 0d 14 |... .menu_item..| 00003370 b4 16 77 69 6d 70 66 6c 61 67 73 3d 26 37 30 30 |..wimpflags=&700| 00003380 30 30 32 31 0d 14 be 0b 66 6c 61 67 73 3d 30 0d |0021....flags=0.| 00003390 14 c8 0d 70 74 72 24 3d 22 2d 31 22 0d 14 d2 0c |...ptr$="-1"....| 000033a0 66 75 6e 63 24 3d 22 22 0d 14 dc 2c 6e 61 6d 65 |func$=""...,name| 000033b0 24 3d a4 67 65 74 5f 6d 65 6e 75 5f 69 74 65 6d |$=.get_menu_item| 000033c0 28 6d 65 6e 75 5f 64 61 74 61 25 2c 6f 66 66 73 |(menu_data%,offs| 000033d0 65 74 25 29 0d 14 e6 50 e7 20 6d 65 6e 75 5f 64 |et%)...P. menu_d| 000033e0 61 74 61 25 3f 6f 66 66 73 65 74 25 3d 97 22 21 |ata%?offset%=."!| 000033f0 22 20 6f 66 66 73 65 74 25 2b 3d 31 3a 70 74 72 |" offset%+=1:ptr| 00003400 24 3d a4 67 65 74 5f 6d 65 6e 75 5f 69 74 65 6d |$=.get_menu_item| 00003410 28 6d 65 6e 75 5f 64 61 74 61 25 2c 6f 66 66 73 |(menu_data%,offs| 00003420 65 74 25 29 0d 14 f0 58 e7 20 6d 65 6e 75 5f 64 |et%)...X. menu_d| 00003430 61 74 61 25 3f 6f 66 66 73 65 74 25 3d 97 22 7b |ata%?offset%=."{| 00003440 22 20 6f 66 66 73 65 74 25 2b 3d 31 3a 77 69 6d |" offset%+=1:wim| 00003450 70 66 6c 61 67 73 3d a0 28 a4 67 65 74 5f 6d 65 |pflags=.(.get_me| 00003460 6e 75 5f 69 74 65 6d 28 6d 65 6e 75 5f 64 61 74 |nu_item(menu_dat| 00003470 61 25 2c 6f 66 66 73 65 74 25 29 29 0d 14 fa 51 |a%,offset%))...Q| 00003480 e7 20 6d 65 6e 75 5f 64 61 74 61 25 3f 6f 66 66 |. menu_data%?off| 00003490 73 65 74 25 3d 97 22 5c 22 20 6f 66 66 73 65 74 |set%=."\" offset| 000034a0 25 2b 3d 31 3a 66 75 6e 63 24 3d a4 67 65 74 5f |%+=1:func$=.get_| 000034b0 6d 65 6e 75 5f 69 74 65 6d 28 6d 65 6e 75 5f 64 |menu_item(menu_d| 000034c0 61 74 61 25 2c 6f 66 66 73 65 74 25 29 0d 15 04 |ata%,offset%)...| 000034d0 49 e7 20 6d 65 6e 75 5f 64 61 74 61 25 3f 6f 66 |I. menu_data%?of| 000034e0 66 73 65 74 25 3d 97 22 7e 22 20 84 20 6d 65 6e |fset%=."~" . men| 000034f0 75 5f 64 61 74 61 25 3f 6f 66 66 73 65 74 25 3d |u_data%?offset%=| 00003500 97 22 5e 22 20 66 6c 61 67 73 3d 66 6c 61 67 73 |."^" flags=flags| 00003510 20 84 20 26 38 30 0d 15 0e 2e e7 20 c0 6e 61 6d | . &80..... .nam| 00003520 65 24 2c 31 29 3d 22 7d 22 20 8c 20 66 6c 61 67 |e$,1)="}" . flag| 00003530 73 2b 3d 31 3a 6e 61 6d 65 24 3d c1 6e 61 6d 65 |s+=1:name$=.name| 00003540 24 2c 32 29 0d 15 18 2e e7 20 c0 6e 61 6d 65 24 |$,2)..... .name$| 00003550 2c 31 29 3d 22 23 22 20 8c 20 66 6c 61 67 73 2b |,1)="#" . flags+| 00003560 3d 34 3a 6e 61 6d 65 24 3d c1 6e 61 6d 65 24 2c |=4:name$=.name$,| 00003570 32 29 0d 15 22 3e e7 20 c2 6e 61 6d 65 24 2c 31 |2)..">. .name$,1| 00003580 29 3d 22 7d 22 20 8c 20 66 6c 61 67 73 2b 3d 32 |)="}" . flags+=2| 00003590 3a 6e 61 6d 65 24 3d c0 6e 61 6d 65 24 2c a9 6e |:name$=.name$,.n| 000035a0 61 6d 65 24 2d 31 29 3a 64 6f 74 73 25 2b 3d 31 |ame$-1):dots%+=1| 000035b0 0d 15 2c 05 e1 0d 15 36 04 0d 15 40 21 dd 20 a4 |..,....6...@!. .| 000035c0 62 75 69 6c 64 5f 73 75 62 6d 65 6e 75 28 74 69 |build_submenu(ti| 000035d0 74 6c 65 24 2c 70 6f 73 25 29 0d 15 4a 0f ea 20 |tle$,pos%)..J.. | 000035e0 62 6c 6b 24 2c 62 6c 6b 25 0d 15 54 1c f2 62 75 |blk$,blk%..T..bu| 000035f0 69 6c 64 5f 6d 65 6e 75 28 74 69 74 6c 65 24 2c |ild_menu(title$,| 00003600 70 6f 73 25 29 0d 15 5e 09 3d 62 6c 6b 24 0d 15 |pos%)..^.=blk$..| 00003610 68 04 0d 15 72 12 dd 20 f2 6d 65 6e 75 5f 73 65 |h...r.. .menu_se| 00003620 6c 65 63 74 0d 15 7c 20 c8 99 20 22 57 69 6d 70 |lect..| .. "Wimp| 00003630 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 6f 22 |_GetPointerInfo"| 00003640 2c 2c 71 25 0d 15 86 0d 62 75 74 25 3d 71 25 21 |,,q%....but%=q%!| 00003650 38 0d 15 90 0c 64 65 70 74 68 25 3d 30 0d 15 9a |8....depth%=0...| 00003660 1f f2 64 65 63 6f 64 65 5f 6d 65 6e 75 28 63 75 |..decode_menu(cu| 00003670 72 72 65 6e 74 5f 6d 65 6e 75 24 29 0d 15 a4 14 |rrent_menu$)....| 00003680 e7 20 28 62 75 74 25 20 80 20 31 29 3d 31 20 8c |. (but% . 1)=1 .| 00003690 0d 15 ae 2d f2 72 65 5f 6f 70 65 6e 6d 65 6e 75 |...-.re_openmenu| 000036a0 28 63 75 72 72 65 6e 74 5f 6d 65 6e 75 24 2c 6d |(current_menu$,m| 000036b0 65 6e 75 78 25 2c 6d 65 6e 75 79 25 29 0d 15 b8 |enux%,menuy%)...| 000036c0 05 cc 0d 15 c2 14 63 75 72 72 65 6e 74 5f 6d 65 |......current_me| 000036d0 6e 75 24 3d 22 22 0d 15 cc 05 cd 0d 15 d6 05 e1 |nu$=""..........| 000036e0 0d 15 e0 04 0d 15 ea 26 dd 20 f2 72 65 5f 6f 70 |.......&. .re_op| 000036f0 65 6e 6d 65 6e 75 28 74 69 74 6c 65 24 2c 6d 65 |enmenu(title$,me| 00003700 6e 78 25 2c 6d 65 6e 79 25 29 0d 15 f4 29 6f 66 |nx%,meny%)...)of| 00003710 66 73 65 74 25 3d a4 66 69 6e 64 5f 6d 65 6e 75 |fset%=.find_menu| 00003720 28 74 69 74 6c 65 24 2c 6d 65 6e 75 5f 64 61 74 |(title$,menu_dat| 00003730 61 25 29 0d 15 fe 2e 62 6c 6b 25 3d a0 28 a4 67 |a%)....blk%=.(.g| 00003740 65 74 5f 6d 65 6e 75 5f 69 74 65 6d 28 6d 65 6e |et_menu_item(men| 00003750 75 5f 64 61 74 61 25 2c 6f 66 66 73 65 74 25 29 |u_data%,offset%)| 00003760 29 0d 16 08 2a c8 99 20 22 57 69 6d 70 5f 43 72 |)...*.. "Wimp_Cr| 00003770 65 61 74 65 4d 65 6e 75 22 2c 2c 62 6c 6b 25 2c |eateMenu",,blk%,| 00003780 6d 65 6e 78 25 2c 6d 65 6e 79 25 0d 16 12 18 63 |menx%,meny%....c| 00003790 75 72 72 65 6e 74 5f 6d 65 6e 75 24 3d 74 69 74 |urrent_menu$=tit| 000037a0 6c 65 24 0d 16 1c 05 e1 0d 16 26 04 0d 16 30 1a |le$.......&...0.| 000037b0 dd 20 f2 64 65 63 6f 64 65 5f 6d 65 6e 75 28 74 |. .decode_menu(t| 000037c0 69 74 6c 65 24 29 0d 16 3a 15 ea 20 6d 65 6e 5f |itle$)..:.. men_| 000037d0 6c 6f 6f 70 25 2c 66 75 6e 63 24 0d 16 44 29 6f |loop%,func$..D)o| 000037e0 66 66 73 65 74 25 3d a4 66 69 6e 64 5f 6d 65 6e |ffset%=.find_men| 000037f0 75 28 74 69 74 6c 65 24 2c 6d 65 6e 75 5f 64 61 |u(title$,menu_da| 00003800 74 61 25 29 0d 16 4e 2e 62 6c 6b 25 3d a0 28 a4 |ta%)..N.blk%=.(.| 00003810 67 65 74 5f 6d 65 6e 75 5f 69 74 65 6d 28 6d 65 |get_menu_item(me| 00003820 6e 75 5f 64 61 74 61 25 2c 6f 66 66 73 65 74 25 |nu_data%,offset%| 00003830 29 29 0d 16 58 0f 6d 65 6e 5f 6c 6f 6f 70 25 3d |))..X.men_loop%=| 00003840 30 0d 16 62 1f c8 95 20 6d 65 6e 5f 6c 6f 6f 70 |0..b... men_loop| 00003850 25 3c 3d 62 6c 6f 63 6b 25 21 64 65 70 74 68 25 |%<=block%!depth%| 00003860 0d 16 6c 0b 64 6f 74 73 25 3d 30 0d 16 76 0e f2 |..l.dots%=0..v..| 00003870 6d 65 6e 75 5f 69 74 65 6d 0d 16 80 10 6d 65 6e |menu_item....men| 00003880 5f 6c 6f 6f 70 25 2b 3d 31 0d 16 8a 05 ce 0d 16 |_loop%+=1.......| 00003890 94 18 e7 20 62 6c 6f 63 6b 25 21 64 65 70 74 68 |... block%!depth| 000038a0 25 3e 2d 31 20 8c 0d 16 9e 15 e7 20 c2 6e 61 6d |%>-1 ...... .nam| 000038b0 65 24 2c 31 29 3d 22 40 22 20 8c 0d 16 a8 1a 6e |e$,1)="@" .....n| 000038c0 61 6d 65 24 3d c0 6e 61 6d 65 24 2c a9 6e 61 6d |ame$=.name$,.nam| 000038d0 65 24 2d 31 29 0d 16 b2 0d 64 65 70 74 68 25 2b |e$-1)....depth%+| 000038e0 3d 34 0d 16 bc 17 f2 64 65 63 6f 64 65 5f 6d 65 |=4.....decode_me| 000038f0 6e 75 28 6e 61 6d 65 24 29 0d 16 c6 05 cd 0d 16 |nu(name$).......| 00003900 d0 21 e7 20 66 75 6e 63 24 3c 3e 22 22 20 8c 20 |.!. func$<>"" . | 00003910 61 3d a0 28 22 46 4e 22 2b 66 75 6e 63 24 29 0d |a=.("FN"+func$).| 00003920 16 da 05 cd 0d 16 e4 05 e1 0d 16 ee 04 0d 16 f8 |................| 00003930 17 dd 20 a4 74 65 6d 70 6c 61 74 65 73 28 66 69 |.. .templates(fi| 00003940 6c 65 24 29 0d 17 02 70 de 20 51 25 20 32 30 34 |le$)...p. Q% 204| 00003950 38 2c 20 50 25 20 32 30 34 38 2c 20 4f 25 20 32 |8, P% 2048, O% 2| 00003960 30 34 38 2c 20 4e 25 20 34 30 39 36 2c 20 4d 25 |048, N% 4096, M%| 00003970 20 32 30 34 38 2c 20 4c 25 20 32 30 34 38 2c 20 | 2048, L% 2048, | 00003980 4b 25 20 32 30 34 38 2c 20 4a 25 20 32 30 34 38 |K% 2048, J% 2048| 00003990 2c 20 49 25 20 32 30 34 38 2c 20 48 25 20 32 30 |, I% 2048, H% 20| 000039a0 34 38 2c 20 47 25 20 32 30 34 38 2c 20 46 25 20 |48, G% 2048, F% | 000039b0 32 30 34 38 0d 17 0c 0f 6d 61 78 77 73 25 3d 26 |2048....maxws%=&| 000039c0 39 30 30 0d 17 16 c6 de 20 69 6e 64 69 72 25 20 |900..... indir% | 000039d0 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 32 25 20 |maxws%, indir2% | 000039e0 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 33 25 20 |maxws%, indir3% | 000039f0 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 34 25 20 |maxws%, indir4% | 00003a00 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 35 25 20 |maxws%, indir5% | 00003a10 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 36 25 20 |maxws%, indir6% | 00003a20 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 37 25 20 |maxws%, indir7% | 00003a30 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 38 25 20 |maxws%, indir8% | 00003a40 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 39 25 20 |maxws%, indir9% | 00003a50 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 31 30 25 |maxws%, indir10%| 00003a60 20 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 31 31 | maxws%, indir11| 00003a70 25 20 6d 61 78 77 73 25 2c 20 69 6e 64 69 72 31 |% maxws%, indir1| 00003a80 32 25 20 6d 61 78 77 73 25 0d 17 20 21 c8 99 20 |2% maxws%.. !.. | 00003a90 22 57 69 6d 70 5f 4f 70 65 6e 54 65 6d 70 6c 61 |"Wimp_OpenTempla| 00003aa0 74 65 22 2c 2c 66 69 6c 65 24 0d 17 2a 3f c8 99 |te",,file$..*?..| 00003ab0 20 22 57 69 6d 70 5f 4c 6f 61 64 54 65 6d 70 6c | "Wimp_LoadTempl| 00003ac0 61 74 65 22 2c 2c 51 25 2c 69 6e 64 69 72 25 2c |ate",,Q%,indir%,| 00003ad0 69 6e 64 69 72 25 2b 6d 61 78 77 73 25 2c 2d 31 |indir%+maxws%,-1| 00003ae0 2c 22 69 6e 66 6f 22 2c 30 0d 17 34 41 c8 99 20 |,"info",0..4A.. | 00003af0 22 57 69 6d 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 |"Wimp_LoadTempla| 00003b00 74 65 22 2c 2c 50 25 2c 69 6e 64 69 72 32 25 2c |te",,P%,indir2%,| 00003b10 69 6e 64 69 72 32 25 2b 6d 61 78 77 73 25 2c 2d |indir2%+maxws%,-| 00003b20 31 2c 22 67 72 69 64 22 2c 30 0d 17 3e 42 c8 99 |1,"grid",0..>B..| 00003b30 20 22 57 69 6d 70 5f 4c 6f 61 64 54 65 6d 70 6c | "Wimp_LoadTempl| 00003b40 61 74 65 22 2c 2c 4f 25 2c 69 6e 64 69 72 33 25 |ate",,O%,indir3%| 00003b50 2c 69 6e 64 69 72 33 25 2b 6d 61 78 77 73 25 2c |,indir3%+maxws%,| 00003b60 2d 31 2c 22 77 6f 72 64 73 22 2c 30 0d 17 48 44 |-1,"words",0..HD| 00003b70 c8 99 20 22 57 69 6d 70 5f 4c 6f 61 64 54 65 6d |.. "Wimp_LoadTem| 00003b80 70 6c 61 74 65 22 2c 2c 4e 25 2c 69 6e 64 69 72 |plate",,N%,indir| 00003b90 34 25 2c 69 6e 64 69 72 34 25 2b 6d 61 78 77 73 |4%,indir4%+maxws| 00003ba0 25 2c 2d 31 2c 22 6f 70 74 69 6f 6e 73 22 2c 30 |%,-1,"options",0| 00003bb0 0d 17 52 44 c8 99 20 22 57 69 6d 70 5f 4c 6f 61 |..RD.. "Wimp_Loa| 00003bc0 64 54 65 6d 70 6c 61 74 65 22 2c 2c 4d 25 2c 69 |dTemplate",,M%,i| 00003bd0 6e 64 69 72 35 25 2c 69 6e 64 69 72 35 25 2b 6d |ndir5%,indir5%+m| 00003be0 61 78 77 73 25 2c 2d 31 2c 22 6e 65 77 67 72 69 |axws%,-1,"newgri| 00003bf0 64 22 2c 30 0d 17 5c 41 c8 99 20 22 57 69 6d 70 |d",0..\A.. "Wimp| 00003c00 5f 4c 6f 61 64 54 65 6d 70 6c 61 74 65 22 2c 2c |_LoadTemplate",,| 00003c10 4c 25 2c 69 6e 64 69 72 36 25 2c 69 6e 64 69 72 |L%,indir6%,indir| 00003c20 36 25 2b 6d 61 78 77 73 25 2c 2d 31 2c 22 73 61 |6%+maxws%,-1,"sa| 00003c30 76 65 22 2c 30 0d 17 66 44 c8 99 20 22 57 69 6d |ve",0..fD.. "Wim| 00003c40 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 74 65 22 2c |p_LoadTemplate",| 00003c50 2c 4b 25 2c 69 6e 64 69 72 37 25 2c 69 6e 64 69 |,K%,indir7%,indi| 00003c60 72 37 25 2b 6d 61 78 77 73 25 2c 2d 31 2c 22 6e |r7%+maxws%,-1,"n| 00003c70 65 77 77 6f 72 64 22 2c 30 0d 17 70 44 c8 99 20 |ewword",0..pD.. | 00003c80 22 57 69 6d 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 |"Wimp_LoadTempla| 00003c90 74 65 22 2c 2c 4a 25 2c 69 6e 64 69 72 38 25 2c |te",,J%,indir8%,| 00003ca0 69 6e 64 69 72 38 25 2b 6d 61 78 77 73 25 2c 2d |indir8%+maxws%,-| 00003cb0 31 2c 22 66 69 74 74 69 6e 67 22 2c 30 0d 17 7a |1,"fitting",0..z| 00003cc0 41 c8 99 20 22 57 69 6d 70 5f 4c 6f 61 64 54 65 |A.. "Wimp_LoadTe| 00003cd0 6d 70 6c 61 74 65 22 2c 2c 49 25 2c 69 6e 64 69 |mplate",,I%,indi| 00003ce0 72 39 25 2c 69 6e 64 69 72 39 25 2b 6d 61 78 77 |r9%,indir9%+maxw| 00003cf0 73 25 2c 2d 31 2c 22 61 75 74 6f 22 2c 30 0d 17 |s%,-1,"auto",0..| 00003d00 84 47 c8 99 20 22 57 69 6d 70 5f 4c 6f 61 64 54 |.G.. "Wimp_LoadT| 00003d10 65 6d 70 6c 61 74 65 22 2c 2c 48 25 2c 69 6e 64 |emplate",,H%,ind| 00003d20 69 72 31 30 25 2c 69 6e 64 69 72 31 30 25 2b 6d |ir10%,indir10%+m| 00003d30 61 78 77 73 25 2c 2d 31 2c 22 73 61 76 65 74 65 |axws%,-1,"savete| 00003d40 78 74 22 2c 30 0d 17 8e 44 c8 99 20 22 57 69 6d |xt",0...D.. "Wim| 00003d50 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 74 65 22 2c |p_LoadTemplate",| 00003d60 2c 47 25 2c 69 6e 64 69 72 31 31 25 2c 69 6e 64 |,G%,indir11%,ind| 00003d70 69 72 31 31 25 2b 6d 61 78 77 73 25 2c 2d 31 2c |ir11%+maxws%,-1,| 00003d80 22 73 74 61 74 73 22 2c 30 0d 17 98 45 c8 99 20 |"stats",0...E.. | 00003d90 22 57 69 6d 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 |"Wimp_LoadTempla| 00003da0 74 65 22 2c 2c 46 25 2c 69 6e 64 69 72 31 32 25 |te",,F%,indir12%| 00003db0 2c 69 6e 64 69 72 31 32 25 2b 6d 61 78 77 73 25 |,indir12%+maxws%| 00003dc0 2c 2d 31 2c 22 72 65 6d 6f 76 65 22 2c 30 0d 17 |,-1,"remove",0..| 00003dd0 a2 26 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 |.&.. "Wimp_Creat| 00003de0 65 57 69 6e 64 6f 77 22 2c 2c 51 25 20 b8 20 69 |eWindow",,Q% . i| 00003df0 6e 66 6f 25 0d 17 ac 26 c8 99 20 22 57 69 6d 70 |nfo%...&.. "Wimp| 00003e00 5f 43 72 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c |_CreateWindow",,| 00003e10 50 25 20 b8 20 67 72 69 64 25 0d 17 b6 27 c8 99 |P% . grid%...'..| 00003e20 20 22 57 69 6d 70 5f 43 72 65 61 74 65 57 69 6e | "Wimp_CreateWin| 00003e30 64 6f 77 22 2c 2c 4f 25 20 b8 20 77 6f 72 64 73 |dow",,O% . words| 00003e40 25 0d 17 c0 29 c8 99 20 22 57 69 6d 70 5f 43 72 |%...).. "Wimp_Cr| 00003e50 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c 4e 25 20 |eateWindow",,N% | 00003e60 b8 20 6f 70 74 69 6f 6e 73 25 0d 17 ca 29 c8 99 |. options%...)..| 00003e70 20 22 57 69 6d 70 5f 43 72 65 61 74 65 57 69 6e | "Wimp_CreateWin| 00003e80 64 6f 77 22 2c 2c 4d 25 20 b8 20 6e 65 77 67 72 |dow",,M% . newgr| 00003e90 69 64 25 0d 17 d4 26 c8 99 20 22 57 69 6d 70 5f |id%...&.. "Wimp_| 00003ea0 43 72 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c 4c |CreateWindow",,L| 00003eb0 25 20 b8 20 73 61 76 65 25 0d 17 de 29 c8 99 20 |% . save%...).. | 00003ec0 22 57 69 6d 70 5f 43 72 65 61 74 65 57 69 6e 64 |"Wimp_CreateWind| 00003ed0 6f 77 22 2c 2c 4b 25 20 b8 20 6e 65 77 77 6f 72 |ow",,K% . newwor| 00003ee0 64 25 0d 17 e8 29 c8 99 20 22 57 69 6d 70 5f 43 |d%...).. "Wimp_C| 00003ef0 72 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c 4a 25 |reateWindow",,J%| 00003f00 20 b8 20 66 69 74 74 69 6e 67 25 0d 17 f2 26 c8 | . fitting%...&.| 00003f10 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 57 69 |. "Wimp_CreateWi| 00003f20 6e 64 6f 77 22 2c 2c 49 25 20 b8 20 61 75 74 6f |ndow",,I% . auto| 00003f30 25 0d 17 fc 2a c8 99 20 22 57 69 6d 70 5f 43 72 |%...*.. "Wimp_Cr| 00003f40 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c 48 25 20 |eateWindow",,H% | 00003f50 b8 20 73 61 76 65 74 65 78 74 25 0d 18 06 27 c8 |. savetext%...'.| 00003f60 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 57 69 |. "Wimp_CreateWi| 00003f70 6e 64 6f 77 22 2c 2c 47 25 20 b8 20 73 74 61 74 |ndow",,G% . stat| 00003f80 73 25 0d 18 10 28 c8 99 20 22 57 69 6d 70 5f 43 |s%...(.. "Wimp_C| 00003f90 72 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c 46 25 |reateWindow",,F%| 00003fa0 20 b8 20 72 65 6d 6f 76 65 25 0d 18 1a 1b c8 99 | . remove%......| 00003fb0 20 22 57 69 6d 70 5f 43 6c 6f 73 65 54 65 6d 70 | "Wimp_CloseTemp| 00003fc0 6c 61 74 65 22 0d 18 24 10 f2 73 65 74 61 6c 6c |late"..$..setall| 00003fd0 69 63 6f 6e 73 0d 18 2e 0a 3d 69 6e 66 6f 25 0d |icons....=info%.| 00003fe0 18 38 04 0d 18 42 12 dd 20 f2 73 65 74 61 6c 6c |.8...B.. .setall| 00003ff0 69 63 6f 6e 73 0d 18 4c 14 f2 73 65 74 6f 70 74 |icons..L..setopt| 00004000 69 6f 6e 73 69 63 6f 6e 73 0d 18 56 24 f2 73 65 |ionsicons..V$.se| 00004010 74 5f 76 65 72 73 69 6f 6e 28 73 61 76 65 25 2c |t_version(save%,| 00004020 31 2c 22 57 6f 72 64 66 69 6c 65 22 29 0d 18 60 |1,"Wordfile")..`| 00004030 28 f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 73 61 |(.set_version(sa| 00004040 76 65 74 65 78 74 25 2c 31 2c 22 54 65 78 74 66 |vetext%,1,"Textf| 00004050 69 6c 65 22 29 0d 18 6a 21 f2 73 65 74 5f 76 65 |ile")..j!.set_ve| 00004060 72 73 69 6f 6e 28 6e 65 77 67 72 69 64 25 2c 32 |rsion(newgrid%,2| 00004070 2c 22 32 30 22 29 0d 18 74 21 f2 73 65 74 5f 76 |,"20")..t!.set_v| 00004080 65 72 73 69 6f 6e 28 6e 65 77 67 72 69 64 25 2c |ersion(newgrid%,| 00004090 33 2c 22 32 30 22 29 0d 18 7e 05 e1 0d 18 88 04 |3,"20")..~......| 000040a0 0d 18 92 1f dd 20 f2 73 65 74 5f 76 65 72 73 69 |..... .set_versi| 000040b0 6f 6e 28 70 74 25 2c 48 25 2c 76 65 72 24 29 0d |on(pt%,H%,ver$).| 000040c0 18 9c 0b 21 71 25 3d 70 74 25 0d 18 a6 0b 71 25 |...!q%=pt%....q%| 000040d0 21 34 3d 48 25 0d 18 b0 1e c8 99 20 22 57 69 6d |!4=H%...... "Wim| 000040e0 70 5f 47 65 74 49 63 6f 6e 53 74 61 74 65 22 2c |p_GetIconState",| 000040f0 2c 71 25 0d 18 ba 0f 24 71 25 21 32 38 3d 76 65 |,q%....$q%!28=ve| 00004100 72 24 0d 18 c4 0a 71 25 21 38 3d 30 0d 18 ce 0b |r$....q%!8=0....| 00004110 71 25 21 31 32 3d 30 0d 18 d8 06 c8 96 0d 18 e2 |q%!12=0.........| 00004120 1e c8 99 20 22 57 69 6d 70 5f 53 65 74 49 63 6f |... "Wimp_SetIco| 00004130 6e 53 74 61 74 65 22 2c 2c 71 25 0d 18 ec 05 e1 |nState",,q%.....| 00004140 0d 18 f6 04 0d 19 00 11 dd 20 f2 66 69 6e 69 73 |......... .finis| 00004150 68 77 69 6d 70 0d 19 0a 23 c8 99 20 22 57 69 6d |hwimp...#.. "Wim| 00004160 70 5f 43 6c 6f 73 65 44 6f 77 6e 22 2c 68 61 6e |p_CloseDown",han| 00004170 64 6c 65 25 2c 21 71 25 0d 19 14 26 c8 99 20 22 |dle%,!q%...&.. "| 00004180 57 69 6d 70 5f 52 65 6c 65 61 73 65 49 6e 74 65 |Wimp_ReleaseInte| 00004190 72 66 61 63 65 22 2c 68 61 6e 64 6c 65 25 0d 19 |rface",handle%..| 000041a0 1e 08 d9 23 20 30 0d 19 28 18 c8 99 20 22 48 6f |...# 0..(... "Ho| 000041b0 75 72 67 6c 61 73 73 5f 53 6d 61 73 68 22 0d 19 |urglass_Smash"..| 000041c0 32 05 e0 0d 19 3c 05 e1 0d 19 46 04 0d 19 50 12 |2....<....F...P.| 000041d0 dd 20 a4 79 6f 72 6e 28 74 65 78 74 24 29 0d 19 |. .yorn(text$)..| 000041e0 5a 2b f4 20 52 65 70 6f 72 74 20 6d 65 73 73 61 |Z+. Report messa| 000041f0 67 65 20 2d 20 72 65 74 75 72 6e 20 74 72 75 65 |ge - return true| 00004200 20 6f 72 20 66 61 6c 73 65 0d 19 64 11 f2 73 6c | or false..d..sl| 00004210 61 62 6f 75 74 69 63 6f 6e 73 0d 19 6e 0d ea 20 |abouticons..n.. | 00004220 61 6e 73 77 65 72 25 0d 19 78 11 21 6f 6b 62 6c |answer%..x.!okbl| 00004230 6f 63 6b 25 3d 32 32 34 0d 19 82 1a 24 28 6f 6b |ock%=224....$(ok| 00004240 62 6c 6f 63 6b 25 2b 34 29 3d 74 65 78 74 24 2b |block%+4)=text$+| 00004250 bd 30 0d 19 8c 3f c8 99 20 22 57 69 6d 70 5f 52 |.0...?.. "Wimp_R| 00004260 65 70 6f 72 74 45 72 72 6f 72 22 2c 6f 6b 62 6c |eportError",okbl| 00004270 6f 63 6b 25 2c 25 31 31 31 2c 22 57 6f 72 64 73 |ock%,%111,"Words| 00004280 65 61 72 63 68 22 20 b8 20 2c 61 6e 73 77 65 72 |earch" . ,answer| 00004290 25 0d 19 96 11 e7 20 61 6e 73 77 65 72 25 3d 31 |%..... answer%=1| 000042a0 20 8c 0d 19 a0 06 3d b9 0d 19 aa 05 cc 0d 19 b4 | .....=.........| 000042b0 06 3d a3 0d 19 be 05 cd 0d 19 c8 04 0d 19 d2 10 |.=..............| 000042c0 dd 20 f2 6f 6b 28 74 65 78 74 24 29 0d 19 dc 14 |. .ok(text$)....| 000042d0 f4 20 52 65 70 6f 72 74 20 6d 65 73 73 61 67 65 |. Report message| 000042e0 0d 19 e6 11 f2 73 6c 61 62 6f 75 74 69 63 6f 6e |.....slabouticon| 000042f0 73 0d 19 f0 11 21 6f 6b 62 6c 6f 63 6b 25 3d 32 |s....!okblock%=2| 00004300 32 34 0d 19 fa 1a 24 28 6f 6b 62 6c 6f 63 6b 25 |24....$(okblock%| 00004310 2b 34 29 3d 74 65 78 74 24 2b bd 30 0d 1a 04 32 |+4)=text$+.0...2| 00004320 c8 99 20 22 57 69 6d 70 5f 52 65 70 6f 72 74 45 |.. "Wimp_ReportE| 00004330 72 72 6f 72 22 2c 6f 6b 62 6c 6f 63 6b 25 2c 25 |rror",okblock%,%| 00004340 31 2c 22 57 6f 72 64 73 65 61 72 63 68 22 0d 1a |1,"Wordsearch"..| 00004350 0e 05 e1 0d 1a 18 04 0d 1a 22 0c dd 20 f2 65 72 |.........".. .er| 00004360 72 6f 72 0d 1a 2c 09 ee 20 85 20 87 0d 1a 36 17 |ror..,.. . ...6.| 00004370 f4 20 52 65 70 6f 72 74 20 52 45 41 4c 20 65 72 |. Report REAL er| 00004380 72 6f 72 0d 1a 40 12 ea 20 64 75 6d 6d 79 24 2c |ror..@.. dummy$,| 00004390 66 72 65 64 25 0d 1a 4a 39 e7 20 68 61 6e 64 6c |fred%..J9. handl| 000043a0 65 25 20 3e 20 2d 31 20 8c 20 c8 99 20 22 57 69 |e% > -1 . .. "Wi| 000043b0 6d 70 5f 44 72 61 67 42 6f 78 22 2c 2c 30 20 3a |mp_DragBox",,0 :| 000043c0 20 f2 73 6c 61 62 6f 75 74 69 63 6f 6e 73 0d 1a | .slabouticons..| 000043d0 54 07 d9 23 30 0d 1a 5e 0e ee 20 85 20 f2 65 72 |T..#0..^.. . .er| 000043e0 72 6f 72 0d 1a 68 86 e7 20 a4 79 6f 72 6e 28 22 |ror..h.. .yorn("| 000043f0 28 49 6e 74 65 72 6e 61 6c 20 65 72 72 6f 72 20 |(Internal error | 00004400 63 6f 64 65 20 22 2b c3 28 9e 29 2b 22 2c 22 2b |code "+.(.)+","+| 00004410 c3 28 9f 29 2b 22 29 20 22 2b f6 24 2b 22 20 43 |.(.)+") "+.$+" C| 00004420 6c 69 63 6b 20 4f 4b 20 74 6f 20 63 6f 6e 74 69 |lick OK to conti| 00004430 6e 75 65 20 6f 72 20 43 61 6e 63 65 6c 20 74 6f |nue or Cancel to| 00004440 20 51 75 69 74 2e 22 29 20 8c 20 64 75 6d 6d 79 | Quit.") . dummy| 00004450 24 3d a4 61 63 74 69 6f 6e 28 a3 29 20 8b 20 66 |$=.action(.) . f| 00004460 72 65 64 25 3d a4 66 69 6e 0d 1a 72 05 e1 0d 1a |red%=.fin..r....| 00004470 7c 04 0d 1a 86 10 f4 20 33 38 30 20 62 79 20 37 ||...... 380 by 7| 00004480 36 38 0d 1a 90 0f dd 20 f2 6f 70 65 6e 67 72 69 |68..... .opengri| 00004490 64 0d 1a 9a 28 f2 6f 70 65 6e 61 6e 79 77 69 6e |d...(.openanywin| 000044a0 64 6f 77 28 67 72 69 64 25 2c 35 30 2c 32 30 30 |dow(grid%,50,200| 000044b0 2c 34 33 30 2c 39 36 38 29 0d 1a a4 05 e1 0d 1a |,430,968).......| 000044c0 ae 04 0d 1a b8 11 f4 20 31 31 30 34 20 42 59 20 |....... 1104 BY | 000044d0 38 36 30 0d 1a c2 10 dd 20 a4 6f 70 65 6e 77 6f |860..... .openwo| 000044e0 72 64 73 0d 1a cc 2c f2 6f 70 65 6e 61 6e 79 77 |rds...,.openanyw| 000044f0 69 6e 64 6f 77 28 77 6f 72 64 73 25 2c 34 36 30 |indow(words%,460| 00004500 2c 32 30 30 2c 31 35 36 34 2c 31 30 36 30 29 0d |,200,1564,1060).| 00004510 1a d6 06 3d 30 0d 1a e0 04 0d 1a ea 11 f4 20 31 |...=0......... 1| 00004520 30 36 32 20 62 79 20 33 36 38 0d 1a f4 12 dd 20 |062 by 368..... | 00004530 a4 6f 70 65 6e 6f 70 74 69 6f 6e 73 0d 1a fe 2d |.openoptions...-| 00004540 f2 6f 70 65 6e 61 6e 79 77 69 6e 64 6f 77 28 6f |.openanywindow(o| 00004550 70 74 69 6f 6e 73 25 2c 31 30 30 2c 32 30 30 2c |ptions%,100,200,| 00004560 31 31 36 32 2c 35 36 38 29 0d 1b 08 06 3d 30 0d |1162,568)....=0.| 00004570 1b 12 04 0d 1b 1c 16 dd 20 f2 73 65 74 6f 70 74 |........ .setopt| 00004580 69 6f 6e 73 69 63 6f 6e 73 0d 1b 26 23 e7 20 62 |ionsicons..&#. b| 00004590 69 61 73 25 20 8c 20 f2 73 65 74 72 61 64 69 6f |ias% . .setradio| 000045a0 28 6f 70 74 69 6f 6e 73 25 2c 31 29 0d 1b 30 2b |(options%,1)..0+| 000045b0 e7 20 77 6f 72 64 70 61 72 74 66 69 6c 6c 25 20 |. wordpartfill% | 000045c0 8c 20 f2 73 65 74 72 61 64 69 6f 28 6f 70 74 69 |. .setradio(opti| 000045d0 6f 6e 73 25 2c 32 29 0d 1b 3a 29 e7 20 6c 65 74 |ons%,2)..:). let| 000045e0 74 65 72 66 69 6c 6c 25 20 8c 20 f2 73 65 74 72 |terfill% . .setr| 000045f0 61 64 69 6f 28 6f 70 74 69 6f 6e 73 25 2c 33 29 |adio(options%,3)| 00004600 0d 1b 44 29 e7 20 62 61 63 6b 67 72 6f 75 6e 64 |..D). background| 00004610 25 20 8c 20 f2 73 65 74 72 61 64 69 6f 28 6f 70 |% . .setradio(op| 00004620 74 69 6f 6e 73 25 2c 35 29 0d 1b 4e 05 e1 0d 1b |tions%,5)..N....| 00004630 58 04 0d 1b 62 10 f4 20 34 33 38 20 62 79 20 32 |X...b.. 438 by 2| 00004640 30 30 0d 1b 6c 12 dd 20 a4 6f 70 65 6e 6e 65 77 |00..l.. .opennew| 00004650 77 6f 72 64 0d 1b 76 2c f2 6f 70 65 6e 61 6e 79 |word..v,.openany| 00004660 77 69 6e 64 6f 77 28 6e 65 77 77 6f 72 64 25 2c |window(newword%,| 00004670 32 30 30 2c 32 30 30 2c 36 33 38 2c 34 30 30 29 |200,200,638,400)| 00004680 0d 1b 80 06 3d 30 0d 1b 8a 04 0d 1b 94 10 f4 20 |....=0......... | 00004690 34 38 36 20 62 79 20 33 30 30 0d 1b 9e 12 dd 20 |486 by 300..... | 000046a0 a4 6f 70 65 6e 6e 65 77 67 72 69 64 0d 1b a8 2d |.opennewgrid...-| 000046b0 f2 6f 70 65 6e 61 6e 79 77 69 6e 64 6f 77 28 6e |.openanywindow(n| 000046c0 65 77 67 72 69 64 25 2c 36 30 30 2c 32 30 30 2c |ewgrid%,600,200,| 000046d0 31 30 38 36 2c 35 30 30 29 0d 1b b2 06 3d 30 0d |1086,500)....=0.| 000046e0 1b bc 04 0d 1b c6 10 f4 20 33 31 36 20 62 79 20 |........ 316 by | 000046f0 31 38 34 0d 1b d0 0f dd 20 a4 6f 70 65 6e 73 61 |184..... .opensa| 00004700 76 65 0d 1b da 29 f2 6f 70 65 6e 61 6e 79 77 69 |ve...).openanywi| 00004710 6e 64 6f 77 28 73 61 76 65 25 2c 35 30 30 2c 35 |ndow(save%,500,5| 00004720 30 30 2c 38 31 36 2c 36 38 34 29 0d 1b e4 06 3d |00,816,684)....=| 00004730 30 0d 1b ee 04 0d 1b f8 10 f4 20 34 33 38 20 62 |0......... 438 b| 00004740 79 20 32 30 30 0d 1c 02 11 dd 20 a4 6f 70 65 6e |y 200..... .open| 00004750 72 65 6d 6f 76 65 0d 1c 0c 2b f2 6f 70 65 6e 61 |remove...+.opena| 00004760 6e 79 77 69 6e 64 6f 77 28 72 65 6d 6f 76 65 25 |nywindow(remove%| 00004770 2c 35 30 30 2c 35 30 30 2c 39 33 38 2c 37 30 30 |,500,500,938,700| 00004780 29 0d 1c 16 06 3d 30 0d 1c 20 04 0d 1c 2a 10 f4 |)....=0.. ...*..| 00004790 20 36 32 30 20 62 79 20 32 32 30 0d 1c 34 12 dd | 620 by 220..4..| 000047a0 20 f2 6f 70 65 6e 66 69 74 74 69 6e 67 0d 1c 3e | .openfitting..>| 000047b0 24 f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 66 69 |$.set_version(fi| 000047c0 74 74 69 6e 67 25 2c 30 2c 22 50 61 75 73 65 22 |tting%,0,"Pause"| 000047d0 29 0d 1c 48 2d f2 6f 70 65 6e 61 6e 79 77 69 6e |)..H-.openanywin| 000047e0 64 6f 77 28 66 69 74 74 69 6e 67 25 2c 35 30 30 |dow(fitting%,500| 000047f0 2c 31 33 30 2c 31 31 32 30 2c 33 35 30 29 0d 1c |,130,1120,350)..| 00004800 52 05 e1 0d 1c 5c 04 0d 1c 66 38 f4 20 36 31 34 |R....\...f8. 614| 00004810 20 62 79 20 31 34 38 20 20 2d 20 41 63 74 75 61 | by 148 - Actua| 00004820 6c 6c 79 20 69 74 27 73 20 6e 6f 77 20 73 6d 61 |lly it's now sma| 00004830 6c 6c 65 72 20 74 68 61 6e 20 74 68 61 74 2e 0d |ller than that..| 00004840 1c 70 0f dd 20 f2 6f 70 65 6e 61 75 74 6f 0d 1c |.p.. .openauto..| 00004850 7a 2a f2 6f 70 65 6e 61 6e 79 77 69 6e 64 6f 77 |z*.openanywindow| 00004860 28 61 75 74 6f 25 2c 35 30 30 2c 34 30 30 2c 31 |(auto%,500,400,1| 00004870 31 31 34 2c 35 34 38 29 0d 1c 84 05 e1 0d 1c 8e |114,548)........| 00004880 04 0d 1c 98 33 dd 20 f2 6f 70 65 6e 61 6e 79 77 |....3. .openanyw| 00004890 69 6e 64 6f 77 28 77 69 6e 64 6f 77 68 61 6e 64 |indow(windowhand| 000048a0 6c 65 25 2c 78 30 25 2c 79 30 25 2c 78 31 25 2c |le%,x0%,y0%,x1%,| 000048b0 79 31 25 29 0d 1c a2 1c 21 6e 65 77 62 6c 6f 63 |y1%)....!newbloc| 000048c0 6b 25 3d 77 69 6e 64 6f 77 68 61 6e 64 6c 65 25 |k%=windowhandle%| 000048d0 0d 1c ac 13 6e 65 77 62 6c 6f 63 6b 25 21 34 3d |....newblock%!4=| 000048e0 78 30 25 0d 1c b6 13 6e 65 77 62 6c 6f 63 6b 25 |x0%....newblock%| 000048f0 21 38 3d 79 30 25 0d 1c c0 14 6e 65 77 62 6c 6f |!8=y0%....newblo| 00004900 63 6b 25 21 31 32 3d 78 31 25 0d 1c ca 14 6e 65 |ck%!12=x1%....ne| 00004910 77 62 6c 6f 63 6b 25 21 31 36 3d 79 31 25 0d 1c |wblock%!16=y1%..| 00004920 d4 12 6e 65 77 62 6c 6f 63 6b 25 21 32 30 3d 30 |..newblock%!20=0| 00004930 0d 1c de 12 6e 65 77 62 6c 6f 63 6b 25 21 32 34 |....newblock%!24| 00004940 3d 30 0d 1c e8 13 6e 65 77 62 6c 6f 63 6b 25 21 |=0....newblock%!| 00004950 32 38 3d 2d 31 0d 1c f2 23 c8 99 20 22 57 69 6d |28=-1...#.. "Wim| 00004960 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c 2c 6e |p_OpenWindow",,n| 00004970 65 77 62 6c 6f 63 6b 25 0d 1c fc 05 e1 0d 1d 06 |ewblock%........| 00004980 04 0d 1d 10 0c dd 20 f2 63 6c 6f 73 65 0d 1d 1a |...... .close...| 00004990 21 c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 57 |!.. "Wimp_CloseW| 000049a0 69 6e 64 6f 77 22 2c 2c 62 6c 6f 63 6b 25 0d 1d |indow",,block%..| 000049b0 24 05 e1 0d 1d 2e 04 0d 1d 38 0b dd 20 f2 6f 70 |$........8.. .op| 000049c0 65 6e 0d 1d 42 20 c8 99 20 22 57 69 6d 70 5f 4f |en..B .. "Wimp_O| 000049d0 70 65 6e 57 69 6e 64 6f 77 22 2c 2c 62 6c 6f 63 |penWindow",,bloc| 000049e0 6b 25 0d 1d 4c 05 e1 0d 1d 56 04 0d 1d 60 20 dd |k%..L....V...` .| 000049f0 20 a4 67 65 74 5f 6d 65 6e 75 5f 69 74 65 6d 28 | .get_menu_item(| 00004a00 64 62 25 2c f8 20 6f 66 66 25 29 0d 1d 6a 09 ea |db%,. off%)..j..| 00004a10 20 73 74 24 0d 1d 74 22 c8 95 20 64 62 25 3f 6f | st$..t".. db%?o| 00004a20 66 66 25 3c 3e 31 30 20 80 20 64 62 25 3f 6f 66 |ff%<>10 . db%?of| 00004a30 66 25 3c 3e 31 33 0d 1d 7e 14 73 74 24 2b 3d bd |f%<>13..~.st$+=.| 00004a40 28 64 62 25 3f 6f 66 66 25 29 0d 1d 88 0b 6f 66 |(db%?off%)....of| 00004a50 66 25 2b 3d 31 0d 1d 92 05 ce 0d 1d 9c 0b 6f 66 |f%+=1.........of| 00004a60 66 25 2b 3d 31 0d 1d a6 08 3d 73 74 24 0d 1d b0 |f%+=1....=st$...| 00004a70 04 0d 1d ba 1d dd 20 a4 66 69 6e 64 5f 6d 65 6e |...... .find_men| 00004a80 75 28 6e 61 6d 65 24 2c 64 61 74 61 25 29 0d 1d |u(name$,data%)..| 00004a90 c4 09 ea 20 66 69 24 0d 1d ce 13 6e 61 6d 65 24 |... fi$....name$| 00004aa0 3d 22 5e 22 2b 6e 61 6d 65 24 0d 1d d8 0d 6f 66 |="^"+name$....of| 00004ab0 66 73 65 74 25 3d 30 0d 1d e2 05 f5 0d 1d ec 25 |fset%=0........%| 00004ac0 66 69 24 3d a4 67 65 74 5f 6d 65 6e 75 5f 69 74 |fi$=.get_menu_it| 00004ad0 65 6d 28 64 61 74 61 25 2c 6f 66 66 73 65 74 25 |em(data%,offset%| 00004ae0 29 0d 1d f6 19 fd 20 66 69 24 3d 6e 61 6d 65 24 |)..... fi$=name$| 00004af0 20 84 20 66 69 24 3d 22 7e 22 0d 1e 00 12 e7 20 | . fi$="~"..... | 00004b00 66 69 24 3d 22 7e 22 20 8c 20 3d b9 0d 1e 0a 0c |fi$="~" . =.....| 00004b10 3d 6f 66 66 73 65 74 25 0d 1e 14 04 0d 1e 1e 0b |=offset%........| 00004b20 dd 20 f2 66 6c 69 70 0d 1e 28 21 6d 61 69 6e 5f |. .flip..(!main_| 00004b30 62 6c 6b 25 21 32 38 3d 6d 61 69 6e 5f 62 6c 6b |blk%!28=main_blk| 00004b40 25 21 32 38 20 82 20 31 0d 1e 32 05 e1 0d 1e 3c |%!28 . 1..2....<| 00004b50 04 0d 1e 46 0f dd 20 a4 6d 65 6e 75 61 75 74 6f |...F.. .menuauto| 00004b60 0d 1e 50 09 f2 61 75 74 6f 0d 1e 5a 06 3d 30 0d |..P..auto..Z.=0.| 00004b70 1e 64 04 0d 1e 6e 2c dd 20 a4 74 65 78 74 66 72 |.d...n,. .textfr| 00004b80 6f 6d 77 72 69 74 61 62 6c 65 28 77 69 6e 64 6f |omwritable(windo| 00004b90 77 68 6e 64 25 2c 69 63 6f 6e 68 6e 64 25 29 0d |whnd%,iconhnd%).| 00004ba0 1e 78 20 f4 20 52 65 61 64 20 74 65 78 74 20 69 |.x . Read text i| 00004bb0 6e 20 77 72 69 74 61 62 6c 65 20 69 63 6f 6e 0d |n writable icon.| 00004bc0 1e 82 0e ea 20 74 68 65 74 65 78 74 24 0d 1e 8c |.... thetext$...| 00004bd0 15 21 74 65 78 74 25 3d 77 69 6e 64 6f 77 68 6e |.!text%=windowhn| 00004be0 64 25 0d 1e 96 14 74 65 78 74 25 21 34 3d 69 63 |d%....text%!4=ic| 00004bf0 6f 6e 68 6e 64 25 0d 1e a0 21 c8 99 20 22 57 69 |onhnd%...!.. "Wi| 00004c00 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 74 65 22 |mp_GetIconState"| 00004c10 2c 2c 74 65 78 74 25 0d 1e aa 0e 3d 24 74 65 78 |,,text%....=$tex| 00004c20 74 25 21 32 38 0d 1e b4 04 0d 1e be 12 dd 20 a4 |t%!28......... .| 00004c30 66 69 6e 66 72 6f 6d 6d 65 6e 75 0d 1e c8 0b f2 |finfrommenu.....| 00004c40 66 69 6e 69 73 68 0d 1e d2 14 f2 75 70 64 61 74 |finish.....updat| 00004c50 65 71 75 61 6c 69 74 69 65 73 0d 1e dc 06 3d 30 |equalities....=0| 00004c60 0d 1e e6 04 0d 1e f0 21 dd 20 f2 73 65 74 72 61 |.......!. .setra| 00004c70 64 69 6f 28 77 69 6e 68 6e 64 25 2c 69 63 6f 6e |dio(winhnd%,icon| 00004c80 68 6e 64 25 29 0d 1e fa 0f 21 71 25 3d 77 69 6e |hnd%)....!q%=win| 00004c90 68 6e 64 25 0d 1f 04 11 71 25 21 34 3d 69 63 6f |hnd%....q%!4=ico| 00004ca0 6e 68 6e 64 25 0d 1f 0e 1e c8 99 20 22 57 69 6d |nhnd%...... "Wim| 00004cb0 70 5f 47 65 74 49 63 6f 6e 53 74 61 74 65 22 2c |p_GetIconState",| 00004cc0 2c 71 25 0d 1f 18 10 71 25 21 38 20 3d 20 31 3c |,q%....q%!8 = 1<| 00004cd0 3c 32 31 0d 1f 22 11 71 25 21 31 32 20 3d 20 31 |<21..".q%!12 = 1| 00004ce0 3c 3c 32 31 0d 1f 2c 1e c8 99 20 22 57 69 6d 70 |<<21..,... "Wimp| 00004cf0 5f 53 65 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c |_SetIconState",,| 00004d00 71 25 0d 1f 36 05 e1 0d 1f 40 04 0d 1f 4a 0a dd |q%..6....@...J..| 00004d10 20 a4 66 69 6e 0d 1f 54 25 e7 20 67 72 69 64 64 | .fin..T%. gridd| 00004d20 65 66 69 6e 65 64 25 20 3d 20 b9 20 80 20 73 61 |efined% = . . sa| 00004d30 76 65 64 25 20 3d 20 a3 20 8c 0d 1f 5e 27 e7 20 |ved% = . ...^'. | 00004d40 a4 72 61 69 73 65 6f 62 6a 65 63 74 69 6f 6e 20 |.raiseobjection | 00004d50 3d 20 b9 20 8c 20 f2 66 69 6e 69 73 68 77 69 6d |= . . .finishwim| 00004d60 70 0d 1f 68 05 cc 0d 1f 72 0f f2 66 69 6e 69 73 |p..h....r..finis| 00004d70 68 77 69 6d 70 0d 1f 7c 05 cd 0d 1f 86 06 3d 30 |hwimp..|......=0| 00004d80 0d 1f 90 04 0d 1f 9a 0c dd 20 a4 70 72 69 6e 74 |......... .print| 00004d90 0d 1f a4 0a f2 70 72 69 6e 74 0d 1f ae 06 3d 30 |.....print....=0| 00004da0 0d 1f b8 04 0d 1f c2 44 dd 20 a4 73 65 63 6f 6e |.......D. .secon| 00004db0 64 61 72 79 63 6c 69 63 6b 28 77 69 6e 64 6f 77 |daryclick(window| 00004dc0 68 6e 64 25 2c 72 65 74 75 72 6e 65 64 68 6e 64 |hnd%,returnedhnd| 00004dd0 25 2c 69 63 6f 6e 68 6e 64 25 2c 62 75 74 25 2c |%,iconhnd%,but%,| 00004de0 6d 78 25 2c 6d 79 25 29 0d 1f cc 18 ea 20 63 6f |mx%,my%)..... co| 00004df0 6e 64 69 74 69 6f 6e 24 2c 72 65 73 75 6c 74 24 |ndition$,result$| 00004e00 0d 1f d6 0d c8 8e 20 62 75 74 25 20 ca 0d 1f e0 |...... but% ....| 00004e10 0a c9 20 25 30 31 30 0d 1f ea 13 6d 65 6e 75 78 |.. %010....menux| 00004e20 25 20 3d 20 6d 78 25 2d 36 34 0d 1f f4 13 6d 65 |% = mx%-64....me| 00004e30 6e 75 79 25 20 3d 20 6d 65 6e 33 79 25 0d 1f fe |nuy% = men3y%...| 00004e40 1c 6d 65 6e 68 65 69 67 68 74 25 20 3d 20 6d 65 |.menheight% = me| 00004e50 6e 33 68 65 69 67 68 74 25 0d 20 08 76 e7 20 72 |n3height%. .v. r| 00004e60 65 74 75 72 6e 65 64 68 6e 64 25 20 3d 20 2d 32 |eturnedhnd% = -2| 00004e70 20 8c 20 f2 72 65 5f 6f 70 65 6e 6d 65 6e 75 28 | . .re_openmenu(| 00004e80 22 20 20 57 6f 72 64 73 65 61 72 63 68 20 20 22 |" Wordsearch "| 00004e90 2c 6d 65 6e 75 78 25 2c 6d 65 6e 68 65 69 67 68 |,menux%,menheigh| 00004ea0 74 25 29 20 8b 20 f2 72 65 5f 6f 70 65 6e 6d 65 |t%) . .re_openme| 00004eb0 6e 75 28 22 20 20 57 6f 72 64 73 65 61 72 63 68 |nu(" Wordsearch| 00004ec0 20 20 22 2c 6d 65 6e 75 78 25 2c 6d 79 25 29 0d | ",menux%,my%).| 00004ed0 20 12 0f c9 20 25 31 30 30 2c 25 30 30 31 0d 20 | ... %100,%001. | 00004ee0 1c 2b e7 20 72 65 74 75 72 6e 65 64 68 6e 64 25 |.+. returnedhnd%| 00004ef0 20 3d 20 2d 32 20 8c 20 f2 69 63 6f 6e 62 61 72 | = -2 . .iconbar| 00004f00 63 6c 69 63 6b 3a 3d 22 22 0d 20 26 3c e7 20 72 |click:="". &<. r| 00004f10 65 74 75 72 6e 65 64 68 6e 64 25 20 3c 3e 20 61 |eturnedhnd% <> a| 00004f20 75 74 6f 25 20 80 20 72 65 74 75 72 6e 65 64 68 |uto% . returnedh| 00004f30 6e 64 25 20 3c 3e 20 66 69 74 74 69 6e 67 25 20 |nd% <> fitting% | 00004f40 8c 20 3d 22 22 0d 20 30 10 f2 73 6c 61 62 69 6e |. ="". 0..slabin| 00004f50 69 63 6f 6e 73 0d 20 3a 37 63 6f 6e 64 69 74 69 |icons. :7conditi| 00004f60 6f 6e 24 20 3d 20 a4 74 65 78 74 66 72 6f 6d 77 |on$ = .textfromw| 00004f70 72 69 74 61 62 6c 65 28 77 69 6e 64 6f 77 68 6e |ritable(windowhn| 00004f80 64 25 2c 69 63 6f 6e 68 6e 64 25 29 0d 20 44 11 |d%,iconhnd%). D.| 00004f90 c8 8e 20 69 63 6f 6e 68 6e 64 25 20 ca 0d 20 4e |.. iconhnd% .. N| 00004fa0 07 c9 20 30 0d 20 58 18 72 65 73 75 6c 74 24 20 |.. 0. X.result$ | 00004fb0 3d 20 63 6f 6e 64 69 74 69 6f 6e 24 0d 20 62 20 |= condition$. b | 00004fc0 f2 74 6f 67 67 6c 65 63 6f 6e 64 69 74 69 6f 6e |.togglecondition| 00004fd0 28 63 6f 6e 64 69 74 69 6f 6e 24 29 0d 20 6c 07 |(condition$). l.| 00004fe0 c9 20 31 0d 20 76 4b e7 20 72 65 74 75 72 6e 65 |. 1. vK. returne| 00004ff0 64 68 6e 64 25 20 3d 20 66 69 74 74 69 6e 67 25 |dhnd% = fitting%| 00005000 20 8c 20 72 65 73 75 6c 74 24 20 3d 20 22 43 61 | . result$ = "Ca| 00005010 6e 63 65 6c 22 20 8b 20 72 65 73 75 6c 74 24 20 |ncel" . result$ | 00005020 3d 20 22 43 61 6e 63 65 6c 61 75 74 6f 22 0d 20 |= "Cancelauto". | 00005030 80 05 cb 0d 20 8a 11 f2 73 6c 61 62 6f 75 74 69 |.... ...slabouti| 00005040 63 6f 6e 73 0d 20 94 05 cb 0d 20 9e 0c 3d 72 65 |cons. .... ..=re| 00005050 73 75 6c 74 24 0d 20 a8 04 0d 20 b2 22 dd 20 f2 |sult$. ... .". .| 00005060 74 6f 67 67 6c 65 63 6f 6e 64 69 74 69 6f 6e 28 |togglecondition(| 00005070 63 6f 6e 64 69 74 69 6f 6e 24 29 0d 20 bc 4b e7 |condition$). .K.| 00005080 20 63 6f 6e 64 69 74 69 6f 6e 24 20 3d 20 22 50 | condition$ = "P| 00005090 61 75 73 65 22 20 8c 20 63 6f 6e 64 69 74 69 6f |ause" . conditio| 000050a0 6e 24 20 3d 20 22 43 6f 6e 74 69 6e 75 65 22 20 |n$ = "Continue" | 000050b0 8b 20 63 6f 6e 64 69 74 69 6f 6e 24 20 3d 20 22 |. condition$ = "| 000050c0 50 61 75 73 65 22 0d 20 c6 29 f2 73 65 74 5f 76 |Pause". .).set_v| 000050d0 65 72 73 69 6f 6e 28 77 69 6e 64 6f 77 68 6e 64 |ersion(windowhnd| 000050e0 25 2c 30 2c 63 6f 6e 64 69 74 69 6f 6e 24 29 0d |%,0,condition$).| 000050f0 20 d0 05 e1 0d 20 da 04 0d 20 e4 25 dd 20 f2 73 | .... ... .%. .s| 00005100 65 74 74 69 74 6c 65 62 61 72 28 68 6e 64 25 2c |ettitlebar(hnd%,| 00005110 74 69 74 6c 65 73 74 72 69 6e 67 24 29 0d 20 ee |titlestring$). .| 00005120 12 21 62 6c 6f 63 6b 25 20 3d 20 68 6e 64 25 0d |.!block% = hnd%.| 00005130 20 f8 23 c8 99 20 22 57 69 6d 70 5f 47 65 74 57 | .#.. "Wimp_GetW| 00005140 69 6e 64 6f 77 49 6e 66 6f 22 2c 2c 62 6c 6f 63 |indowInfo",,bloc| 00005150 6b 25 0d 21 02 24 24 28 62 6c 6f 63 6b 25 21 37 |k%.!.$$(block%!7| 00005160 36 29 20 3d 20 74 69 74 6c 65 73 74 72 69 6e 67 |6) = titlestring| 00005170 24 20 2b 20 bd 30 0d 21 0c 05 e1 0d 21 16 04 0d |$ + .0.!....!...| 00005180 21 20 0b dd 20 a4 68 65 6c 70 0d 21 2a 33 f4 20 |! .. .help.!*3. | 00005190 53 74 61 72 74 20 55 6e 69 76 65 72 73 61 6c 20 |Start Universal | 000051a0 41 70 70 6c 69 63 61 74 69 6f 6e 20 48 65 6c 70 |Application Help| 000051b0 20 61 73 20 61 20 73 75 62 74 61 73 6b 0d 21 34 | as a subtask.!4| 000051c0 15 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f |... "Hourglass_O| 000051d0 6e 22 0d 21 3e 31 24 28 6e 65 77 62 6c 6f 63 6b |n".!>1$(newblock| 000051e0 25 29 20 3d 20 22 4f 62 65 79 20 3c 57 6f 72 64 |%) = "Obey <Word| 000051f0 24 44 69 72 3e 2e 4c 6f 61 64 48 65 6c 70 22 20 |$Dir>.LoadHelp" | 00005200 2b bd 30 0d 21 48 21 c8 99 20 22 57 69 6d 70 5f |+.0.!H!.. "Wimp_| 00005210 53 74 61 72 74 54 61 73 6b 22 2c 6e 65 77 62 6c |StartTask",newbl| 00005220 6f 63 6b 25 0d 21 52 16 c8 99 20 22 48 6f 75 72 |ock%.!R... "Hour| 00005230 67 6c 61 73 73 5f 4f 66 66 22 0d 21 5c 06 3d 30 |glass_Off".!\.=0| 00005240 0d 21 66 04 0d 21 70 14 dd 20 f2 70 72 6f 74 65 |.!f..!p.. .prote| 00005250 73 74 61 74 6e 61 6d 65 0d 21 7a 11 f2 73 6c 61 |statname.!z..sla| 00005260 62 6f 75 74 69 63 6f 6e 73 0d 21 84 3a f2 6f 6b |bouticons.!.:.ok| 00005270 28 22 44 72 61 67 20 74 68 65 20 66 69 6c 65 20 |("Drag the file | 00005280 69 63 6f 6e 20 69 6e 74 6f 20 61 20 46 69 6c 65 |icon into a File| 00005290 72 20 77 69 6e 64 6f 77 20 74 6f 20 73 61 76 65 |r window to save| 000052a0 2e 22 29 0d 21 8e 05 e1 0d 21 98 04 0d 21 a2 16 |.").!....!...!..| 000052b0 dd 20 f2 75 70 64 61 74 65 71 75 61 6c 69 74 69 |. .updatequaliti| 000052c0 65 73 0d 21 ac 2d f2 73 65 74 5f 76 65 72 73 69 |es.!.-.set_versi| 000052d0 6f 6e 28 73 74 61 74 73 25 2c 32 2c a4 77 6f 72 |on(stats%,2,.wor| 000052e0 64 71 75 61 6c 69 74 79 73 74 72 69 6e 67 29 0d |dqualitystring).| 000052f0 21 b6 2d f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 |!.-.set_version(| 00005300 73 74 61 74 73 25 2c 33 2c a4 66 69 6c 6c 71 75 |stats%,3,.fillqu| 00005310 61 6c 69 74 79 73 74 72 69 6e 67 29 0d 21 c0 05 |alitystring).!..| 00005320 e1 0d 21 ca 04 0d 21 d4 15 dd 20 f2 63 6c 65 61 |..!...!... .clea| 00005330 72 71 75 61 6c 69 74 69 65 73 0d 21 de 1d f2 73 |rqualities.!...s| 00005340 65 74 5f 76 65 72 73 69 6f 6e 28 73 74 61 74 73 |et_version(stats| 00005350 25 2c 32 2c 22 22 29 0d 21 e8 1d f2 73 65 74 5f |%,2,"").!...set_| 00005360 76 65 72 73 69 6f 6e 28 73 74 61 74 73 25 2c 33 |version(stats%,3| 00005370 2c 22 22 29 0d 21 f2 05 e1 0d 21 fc 04 0d 22 06 |,"").!....!...".| 00005380 17 dd 20 f2 63 6c 65 61 72 66 69 6c 6c 71 75 61 |.. .clearfillqua| 00005390 6c 69 74 79 0d 22 10 1d f2 73 65 74 5f 76 65 72 |lity."...set_ver| 000053a0 73 69 6f 6e 28 73 74 61 74 73 25 2c 33 2c 22 22 |sion(stats%,3,""| 000053b0 29 0d 22 1a 16 70 6f 73 73 69 62 6c 65 66 69 6c |)."..possiblefil| 000053c0 6c 73 25 20 3d 20 30 0d 22 24 13 61 63 74 75 61 |ls% = 0."$.actua| 000053d0 6c 66 69 6c 6c 73 20 3d 20 30 0d 22 2e 05 e1 0d |lfills = 0."....| 000053e0 22 38 04 0d 22 42 10 dd 20 a4 63 6c 65 61 72 67 |"8.."B.. .clearg| 000053f0 61 70 73 0d 22 4c 12 f2 63 68 65 63 6b 66 6f 72 |aps."L..checkfor| 00005400 68 6f 6c 65 73 0d 22 56 12 f2 75 70 64 61 74 65 |holes."V..update| 00005410 67 72 69 64 28 30 29 0d 22 60 15 f2 63 6c 65 61 |grid(0)."`..clea| 00005420 72 66 69 6c 6c 71 75 61 6c 69 74 79 0d 22 6a 06 |rfillquality."j.| 00005430 3d 30 0d 22 74 04 0d 22 7e 4b f4 2a 2a 2a 2a 2a |=0."t.."~K.*****| 00005440 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00005480 2a 0d 22 88 4b f4 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |*.".K.**********| 00005490 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 20 20 20 20 |*********** | 000054a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000054b0 20 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a | **************| 000054c0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 22 92 4b |************.".K| 000054d0 f4 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |.***************| 000054e0 2a 2a 2a 2a 2a 2a 20 20 20 20 57 6f 72 64 73 65 |****** Wordse| 000054f0 61 72 63 68 20 63 6f 64 65 20 20 20 20 2a 2a 2a |arch code ***| 00005500 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00005510 2a 2a 2a 2a 2a 2a 2a 0d 22 9c 4b f4 2a 2a 2a 2a |*******.".K.****| 00005520 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00005530 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |* | 00005540 20 20 20 20 20 20 20 20 2a 2a 2a 2a 2a 2a 2a 2a | ********| 00005550 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00005560 2a 2a 0d 22 a6 4b f4 2a 2a 2a 2a 2a 2a 2a 2a 2a |**.".K.*********| 00005570 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000055a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 22 b0 |*************.".| 000055b0 04 0d 22 ba 18 dd 20 f2 73 65 74 62 61 63 6b 67 |.."... .setbackg| 000055c0 72 6f 75 6e 64 6d 61 73 6b 0d 22 c4 21 6d 61 73 |roundmask.".!mas| 000055d0 6b 25 20 3d 20 25 31 30 30 31 31 31 31 31 31 30 |k% = %1001111110| 000055e0 30 31 31 30 31 31 30 30 30 30 0d 22 ce 05 e1 0d |0110110000."....| 000055f0 22 d8 04 0d 22 e2 0c f4 20 3e 57 6f 72 64 33 0d |"..."... >Word3.| 00005600 22 ec 10 f4 20 56 65 72 73 69 6f 6e 3a 20 33 0d |"... Version: 3.| 00005610 22 f6 85 f4 20 53 6f 6d 65 20 6f 66 20 74 68 69 |"... Some of thi| 00005620 73 2c 20 70 61 72 74 69 63 75 6c 61 72 6c 79 20 |s, particularly | 00005630 77 6f 72 64 2d 66 69 74 74 69 6e 67 20 73 65 63 |word-fitting sec| 00005640 74 69 6f 6e 2c 20 77 61 73 20 77 72 69 74 74 65 |tion, was writte| 00005650 6e 20 73 6f 6d 65 20 74 69 6d 65 20 61 67 6f 2e |n some time ago.| 00005660 20 48 61 64 20 74 6f 20 62 65 20 61 6c 74 65 72 | Had to be alter| 00005670 65 64 20 73 6f 6d 65 77 68 61 74 2e 20 41 70 6f |ed somewhat. Apo| 00005680 6c 6f 67 69 65 73 20 66 6f 72 20 6d 65 73 73 79 |logies for messy| 00005690 6e 65 73 73 0d 23 00 04 0d 23 0a 1a dd 20 f2 72 |ness.#...#... .r| 000056a0 65 6d 6f 76 65 28 72 65 6d 6f 76 65 77 6f 72 64 |emove(removeword| 000056b0 24 29 0d 23 14 13 ea 20 72 6e 75 6d 25 2c 6c 65 |$).#... rnum%,le| 000056c0 74 74 65 72 25 0d 23 1e 1c e7 20 a9 28 72 65 6d |tter%.#... .(rem| 000056d0 6f 76 65 77 6f 72 64 24 29 20 3d 20 30 20 8c 20 |oveword$) = 0 . | 000056e0 e1 0d 23 28 39 72 6e 75 6d 25 20 3d 20 a4 73 65 |..#(9rnum% = .se| 000056f0 61 72 63 68 74 68 72 6f 75 67 68 77 6f 72 64 73 |archthroughwords| 00005700 28 a4 75 70 70 65 72 5f 63 61 73 65 28 72 65 6d |(.upper_case(rem| 00005710 6f 76 65 77 6f 72 64 24 29 29 0d 23 32 2b e7 20 |oveword$)).#2+. | 00005720 72 6e 75 6d 25 20 3d 20 39 39 39 20 8c 20 f2 6f |rnum% = 999 . .o| 00005730 6b 28 22 57 6f 72 64 20 6e 6f 74 20 66 6f 75 6e |k("Word not foun| 00005740 64 22 29 3a e1 0d 23 3c 15 c8 99 20 22 48 6f 75 |d"):..#<... "Hou| 00005750 72 67 6c 61 73 73 5f 4f 6e 22 0d 23 46 16 f2 64 |rglass_On".#F..d| 00005760 65 6c 65 74 65 77 6f 72 64 28 72 6e 75 6d 25 29 |eleteword(rnum%)| 00005770 0d 23 50 18 f2 73 68 69 66 74 77 6f 72 64 73 75 |.#P..shiftwordsu| 00005780 70 28 72 6e 75 6d 25 29 0d 23 5a 12 f2 63 68 65 |p(rnum%).#Z..che| 00005790 63 6b 66 6f 72 68 6f 6c 65 73 0d 23 64 10 f2 75 |ckforholes.#d..u| 000057a0 70 64 61 74 65 77 6f 72 64 73 0d 23 6e 12 f2 75 |pdatewords.#n..u| 000057b0 70 64 61 74 65 67 72 69 64 28 30 29 0d 23 78 14 |pdategrid(0).#x.| 000057c0 f2 75 70 64 61 74 65 71 75 61 6c 69 74 69 65 73 |.updatequalities| 000057d0 0d 23 82 15 f2 63 6c 65 61 72 66 69 6c 6c 71 75 |.#...clearfillqu| 000057e0 61 6c 69 74 79 0d 23 8c 14 f2 63 6c 65 61 72 72 |ality.#...clearr| 000057f0 65 6d 6f 76 65 69 63 6f 6e 0d 23 96 16 c8 99 20 |emoveicon.#.... | 00005800 22 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d |"Hourglass_Off".| 00005810 23 a0 05 e1 0d 23 aa 04 0d 23 b4 18 dd 20 f2 64 |#....#...#... .d| 00005820 65 6c 65 74 65 77 6f 72 64 28 72 6e 75 6d 25 29 |eleteword(rnum%)| 00005830 0d 23 be 0b ea 20 78 25 2c 79 25 0d 23 c8 24 e3 |.#... x%,y%.#.$.| 00005840 20 6c 65 74 74 65 72 25 20 3d 20 31 20 b8 20 a9 | letter% = 1 . .| 00005850 28 77 6f 72 64 73 24 28 72 6e 75 6d 25 29 29 0d |(words$(rnum%)).| 00005860 23 d2 34 78 25 20 3d 20 77 6f 72 64 73 78 25 28 |#.4x% = wordsx%(| 00005870 72 6e 75 6d 25 29 2b 28 6c 65 74 74 65 72 25 2a |rnum%)+(letter%*| 00005880 77 6f 72 64 73 68 6f 72 69 7a 25 28 72 6e 75 6d |wordshoriz%(rnum| 00005890 25 29 29 0d 23 dc 33 79 25 20 3d 20 77 6f 72 64 |%)).#.3y% = word| 000058a0 73 79 25 28 72 6e 75 6d 25 29 2b 28 6c 65 74 74 |sy%(rnum%)+(lett| 000058b0 65 72 25 2a 77 6f 72 64 73 76 65 72 74 25 28 72 |er%*wordsvert%(r| 000058c0 6e 75 6d 25 29 29 0d 23 e6 18 6e 75 6d 62 65 72 |num%)).#..number| 000058d0 73 25 28 78 25 2c 79 25 29 20 2d 3d 20 31 0d 23 |s%(x%,y%) -= 1.#| 000058e0 f0 2b e7 20 6e 75 6d 62 65 72 73 25 28 78 25 2c |.+. numbers%(x%,| 000058f0 79 25 29 20 3d 20 30 20 8c 20 66 69 74 71 75 61 |y%) = 0 . fitqua| 00005900 6c 69 74 79 20 2d 3d 20 31 0d 23 fa 0d ed 20 6c |lity -= 1.#... l| 00005910 65 74 74 65 72 25 0d 24 04 05 e1 0d 24 0e 04 0d |etter%.$....$...| 00005920 24 18 26 dd 20 a4 73 65 61 72 63 68 74 68 72 6f |$.&. .searchthro| 00005930 75 67 68 77 6f 72 64 73 28 73 65 61 72 63 68 77 |ughwords(searchw| 00005940 6f 72 64 24 29 0d 24 22 17 ea 20 74 68 69 73 77 |ord$).$".. thisw| 00005950 6f 72 64 25 2c 6e 75 6d 62 65 72 25 0d 24 2c 11 |ord%,number%.$,.| 00005960 6e 75 6d 62 65 72 25 20 3d 20 39 39 39 0d 24 36 |number% = 999.$6| 00005970 26 e3 20 74 68 69 73 77 6f 72 64 25 20 3d 20 31 |&. thisword% = 1| 00005980 20 b8 20 6e 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 | . number_of_wor| 00005990 64 73 25 0d 24 40 5a e7 20 77 6f 72 64 73 24 28 |ds%.$@Z. words$(| 000059a0 74 68 69 73 77 6f 72 64 25 29 20 3d 20 73 65 61 |thisword%) = sea| 000059b0 72 63 68 77 6f 72 64 24 20 8c 20 6e 75 6d 62 65 |rchword$ . numbe| 000059c0 72 25 20 3d 20 74 68 69 73 77 6f 72 64 25 20 3a |r% = thisword% :| 000059d0 20 74 68 69 73 77 6f 72 64 25 20 3d 20 6e 75 6d | thisword% = num| 000059e0 62 65 72 5f 6f 66 5f 77 6f 72 64 73 25 0d 24 4a |ber_of_words%.$J| 000059f0 0f ed 20 74 68 69 73 77 6f 72 64 25 0d 24 54 0c |.. thisword%.$T.| 00005a00 3d 6e 75 6d 62 65 72 25 0d 24 5e 04 0d 24 68 1c |=number%.$^..$h.| 00005a10 dd 20 f2 73 68 69 66 74 77 6f 72 64 73 75 70 28 |. .shiftwordsup(| 00005a20 6e 75 6d 62 65 72 25 29 0d 24 72 0f ea 20 74 68 |number%).$r.. th| 00005a30 69 73 77 6f 72 64 25 0d 24 7c 2e e3 20 74 68 69 |isword%.$|.. thi| 00005a40 73 77 6f 72 64 25 20 3d 20 6e 75 6d 62 65 72 25 |sword% = number%| 00005a50 20 b8 20 6e 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 | . number_of_wor| 00005a60 64 73 25 2d 31 0d 24 86 2b 77 6f 72 64 73 24 28 |ds%-1.$.+words$(| 00005a70 74 68 69 73 77 6f 72 64 25 29 20 3d 20 77 6f 72 |thisword%) = wor| 00005a80 64 73 24 28 74 68 69 73 77 6f 72 64 25 2b 31 29 |ds$(thisword%+1)| 00005a90 0d 24 90 2d 77 6f 72 64 73 78 25 28 74 68 69 73 |.$.-wordsx%(this| 00005aa0 77 6f 72 64 25 29 20 3d 20 77 6f 72 64 73 78 25 |word%) = wordsx%| 00005ab0 28 74 68 69 73 77 6f 72 64 25 2b 31 29 0d 24 9a |(thisword%+1).$.| 00005ac0 2d 77 6f 72 64 73 79 25 28 74 68 69 73 77 6f 72 |-wordsy%(thiswor| 00005ad0 64 25 29 20 3d 20 77 6f 72 64 73 79 25 28 74 68 |d%) = wordsy%(th| 00005ae0 69 73 77 6f 72 64 25 2b 31 29 0d 24 a4 33 77 6f |isword%+1).$.3wo| 00005af0 72 64 73 76 65 72 74 25 28 74 68 69 73 77 6f 72 |rdsvert%(thiswor| 00005b00 64 25 29 20 3d 20 77 6f 72 64 73 76 65 72 74 25 |d%) = wordsvert%| 00005b10 28 74 68 69 73 77 6f 72 64 25 2b 31 29 0d 24 ae |(thisword%+1).$.| 00005b20 35 77 6f 72 64 73 68 6f 72 69 7a 25 28 74 68 69 |5wordshoriz%(thi| 00005b30 73 77 6f 72 64 25 29 20 3d 20 77 6f 72 64 73 68 |sword%) = wordsh| 00005b40 6f 72 69 7a 25 28 74 68 69 73 77 6f 72 64 25 2b |oriz%(thisword%+| 00005b50 31 29 0d 24 b8 0f ed 20 74 68 69 73 77 6f 72 64 |1).$... thisword| 00005b60 25 0d 24 c2 21 77 6f 72 64 73 24 28 6e 75 6d 62 |%.$.!words$(numb| 00005b70 65 72 5f 6f 66 5f 77 6f 72 64 73 25 29 20 3d 20 |er_of_words%) = | 00005b80 22 22 0d 24 cc 19 6e 75 6d 62 65 72 5f 6f 66 5f |"".$..number_of_| 00005b90 77 6f 72 64 73 25 20 2d 3d 20 31 0d 24 d6 05 e1 |words% -= 1.$...| 00005ba0 0d 24 e0 04 0d 24 ea 14 dd 20 f2 63 68 65 63 6b |.$...$... .check| 00005bb0 66 6f 72 68 6f 6c 65 73 0d 24 f4 0b ea 20 78 25 |forholes.$... x%| 00005bc0 2c 79 25 0d 24 fe 17 e3 20 78 25 20 3d 20 31 20 |,y%.$... x% = 1 | 00005bd0 b8 20 78 73 69 7a 65 25 2b 31 0d 25 08 17 e3 20 |. xsize%+1.%... | 00005be0 79 25 20 3d 20 31 20 b8 20 79 73 69 7a 65 25 2b |y% = 1 . ysize%+| 00005bf0 31 0d 25 12 2d e7 20 6e 75 6d 62 65 72 73 25 28 |1.%.-. numbers%(| 00005c00 78 25 2c 79 25 29 20 3d 20 30 20 8c 20 67 72 69 |x%,y%) = 0 . gri| 00005c10 64 24 28 78 25 2c 79 25 29 20 3d 20 22 22 0d 25 |d$(x%,y%) = "".%| 00005c20 1c 08 ed 20 79 25 0d 25 26 08 ed 20 78 25 0d 25 |... y%.%&.. x%.%| 00005c30 30 05 e1 0d 25 3a 04 0d 25 44 0b dd 20 f2 61 75 |0...%:..%D.. .au| 00005c40 74 6f 0d 25 4e 10 ea 20 63 61 6e 63 65 6c 6c 65 |to.%N.. cancelle| 00005c50 64 25 0d 25 58 12 63 61 6e 63 65 6c 6c 65 64 25 |d%.%X.cancelled%| 00005c60 20 3d 20 a3 0d 25 62 17 e7 20 62 61 63 6b 67 72 | = ..%b.. backgr| 00005c70 6f 75 6e 64 25 20 3d 20 b9 20 8c 0d 25 6c 0d f2 |ound% = . ..%l..| 00005c80 6f 70 65 6e 61 75 74 6f 0d 25 76 0f 62 75 74 25 |openauto.%v.but%| 00005c90 20 3d 20 25 31 30 30 0d 25 80 05 cc 0d 25 8a 15 | = %100.%....%..| 00005ca0 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f 6e |.. "Hourglass_On| 00005cb0 22 0d 25 94 05 cd 0d 25 9e 12 66 61 69 6c 63 6f |".%....%..failco| 00005cc0 75 6e 74 25 20 3d 20 30 0d 25 a8 2b 64 69 63 74 |unt% = 0.%.+dict| 00005cd0 69 6f 6e 61 72 79 20 3d 20 8e 28 22 3c 57 6f 72 |ionary = .("<Wor| 00005ce0 64 24 44 69 72 3e 2e 44 69 63 74 69 6f 6e 61 72 |d$Dir>.Dictionar| 00005cf0 79 22 29 0d 25 b2 05 f5 0d 25 bc 46 e7 20 62 61 |y").%....%.F. ba| 00005d00 63 6b 67 72 6f 75 6e 64 25 20 80 20 a4 6e 65 77 |ckground% . .new| 00005d10 5f 77 6f 72 64 28 22 44 22 2c 22 64 75 6d 6d 79 |_word("D","dummy| 00005d20 22 29 20 3d 20 22 43 61 6e 63 65 6c 22 20 8c 20 |") = "Cancel" . | 00005d30 63 61 6e 63 65 6c 6c 65 64 25 20 3d 20 b9 0d 25 |cancelled% = ..%| 00005d40 c6 14 f2 75 70 64 61 74 65 71 75 61 6c 69 74 69 |...updatequaliti| 00005d50 65 73 0d 25 d0 44 fd 20 66 61 69 6c 63 6f 75 6e |es.%.D. failcoun| 00005d60 74 25 20 3d 20 35 20 84 20 6e 75 6d 62 65 72 5f |t% = 5 . number_| 00005d70 6f 66 5f 77 6f 72 64 73 25 20 3d 20 6d 61 78 77 |of_words% = maxw| 00005d80 6f 72 64 73 25 20 84 20 63 61 6e 63 65 6c 6c 65 |ords% . cancelle| 00005d90 64 25 20 3d 20 b9 0d 25 da 10 d9 23 64 69 63 74 |d% = ..%...#dict| 00005da0 69 6f 6e 61 72 79 0d 25 e4 40 e7 20 28 62 61 63 |ionary.%.@. (bac| 00005db0 6b 67 72 6f 75 6e 64 25 20 80 20 63 61 6e 63 65 |kground% . cance| 00005dc0 6c 6c 65 64 25 20 3d 20 a3 29 20 84 20 62 61 63 |lled% = .) . bac| 00005dd0 6b 67 72 6f 75 6e 64 25 20 3d 20 a3 20 8c 20 f2 |kground% = . . .| 00005de0 66 69 6e 69 73 68 0d 25 ee 13 e7 20 62 61 63 6b |finish.%... back| 00005df0 67 72 6f 75 6e 64 25 20 8c 0d 25 f8 18 f2 63 6c |ground% ..%...cl| 00005e00 6f 73 65 6f 6e 63 6c 69 63 6b 28 61 75 74 6f 25 |oseonclick(auto%| 00005e10 29 0d 26 02 05 cc 0d 26 0c 16 c8 99 20 22 48 6f |).&....&.... "Ho| 00005e20 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d 26 16 05 |urglass_Off".&..| 00005e30 cd 0d 26 20 05 e1 0d 26 2a 04 0d 26 34 24 dd 20 |..& ...&*..&4$. | 00005e40 a4 6e 65 77 5f 77 6f 72 64 28 73 6f 75 72 63 65 |.new_word(source| 00005e50 24 2c 70 61 73 73 65 64 77 6f 72 64 24 29 0d 26 |$,passedword$).&| 00005e60 3e 49 f4 20 50 6c 61 63 65 20 6e 65 77 20 77 6f |>I. Place new wo| 00005e70 72 64 20 6f 6e 20 67 72 69 64 20 20 20 22 49 22 |rd on grid "I"| 00005e80 20 3d 20 49 6e 70 75 74 20 6e 65 77 20 77 6f 72 | = Input new wor| 00005e90 64 20 20 22 44 22 20 3d 20 55 73 65 20 44 69 63 |d "D" = Use Dic| 00005ea0 74 69 6f 6e 61 72 79 0d 26 48 82 ea 20 6d 61 78 |tionary.&H.. max| 00005eb0 6c 65 6e 67 74 68 25 2c 6e 65 77 77 6f 72 64 24 |length%,newword$| 00005ec0 2c 76 65 72 74 25 2c 68 6f 72 69 7a 25 2c 78 25 |,vert%,horiz%,x%| 00005ed0 2c 79 25 2c 70 72 69 6f 72 69 74 79 25 2c 64 65 |,y%,priority%,de| 00005ee0 63 69 64 65 64 78 25 2c 64 65 63 69 64 65 64 79 |cidedx%,decidedy| 00005ef0 25 2c 64 65 63 69 64 65 64 76 65 72 74 25 2c 64 |%,decidedvert%,d| 00005f00 65 63 69 64 65 64 68 6f 72 69 7a 25 2c 72 61 6e |ecidedhoriz%,ran| 00005f10 25 2c 6c 65 74 74 65 72 25 2c 78 73 74 61 72 74 |%,letter%,xstart| 00005f20 25 2c 79 73 74 61 72 74 25 0d 26 52 54 e7 20 6e |%,ystart%.&RT. n| 00005f30 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 64 73 25 20 |umber_of_words% | 00005f40 3d 20 6d 61 78 77 6f 72 64 73 25 20 8c 20 f2 6f |= maxwords% . .o| 00005f50 6b 28 22 53 6f 72 72 79 2c 20 6e 6f 20 6d 6f 72 |k("Sorry, no mor| 00005f60 65 20 77 6f 72 64 73 20 63 61 6e 20 62 65 20 66 |e words can be f| 00005f70 69 74 74 65 64 22 29 20 3a 20 3d 22 22 0d 26 5c |itted") : ="".&\| 00005f80 12 70 72 69 6f 72 69 74 79 25 20 3d 20 2d 31 0d |.priority% = -1.| 00005f90 26 66 0d 72 61 6e 25 3d b3 28 32 29 0d 26 70 24 |&f.ran%=.(2).&p$| 00005fa0 6d 61 78 6c 65 6e 67 74 68 25 20 3d 20 a4 6d 61 |maxlength% = .ma| 00005fb0 78 28 78 73 69 7a 65 25 2c 79 73 69 7a 65 25 29 |x(xsize%,ysize%)| 00005fc0 0d 26 7a 15 e7 20 73 6f 75 72 63 65 24 20 3d 20 |.&z.. source$ = | 00005fd0 22 49 22 20 8c 0d 26 84 3c 6e 65 77 77 6f 72 64 |"I" ..&.<newword| 00005fe0 24 20 3d 20 a4 73 74 72 69 70 6c 65 61 64 69 6e |$ = .stripleadin| 00005ff0 67 73 70 61 63 65 73 28 a4 75 70 70 65 72 5f 63 |gspaces(.upper_c| 00006000 61 73 65 28 70 61 73 73 65 64 77 6f 72 64 24 29 |ase(passedword$)| 00006010 29 0d 26 8e 15 f2 63 6c 65 61 72 6e 65 77 77 6f |).&...clearnewwo| 00006020 72 64 69 63 6f 6e 0d 26 98 1b e7 20 a9 28 6e 65 |rdicon.&... .(ne| 00006030 77 77 6f 72 64 24 29 20 3d 20 30 20 8c 20 3d 22 |wword$) = 0 . ="| 00006040 22 0d 26 a2 23 cc 20 6e 65 77 77 6f 72 64 24 20 |".&.#. newword$ | 00006050 3d 20 a4 75 70 70 65 72 5f 63 61 73 65 28 a4 64 |= .upper_case(.d| 00006060 69 63 74 29 0d 26 ac 05 cd 0d 26 b6 34 e7 20 78 |ict).&....&.4. x| 00006070 73 69 7a 65 25 20 3e 20 31 20 8c 20 78 73 74 61 |size% > 1 . xsta| 00006080 72 74 25 20 3d 20 b3 28 78 73 69 7a 65 25 29 20 |rt% = .(xsize%) | 00006090 8b 20 78 73 74 61 72 74 25 20 3d 20 31 0d 26 c0 |. xstart% = 1.&.| 000060a0 34 e7 20 79 73 69 7a 65 25 20 3e 20 31 20 8c 20 |4. ysize% > 1 . | 000060b0 79 73 74 61 72 74 25 20 3d 20 b3 28 79 73 69 7a |ystart% = .(ysiz| 000060c0 65 25 29 20 8b 20 79 73 74 61 72 74 25 20 3d 20 |e%) . ystart% = | 000060d0 31 0d 26 ca 17 e7 20 62 61 63 6b 67 72 6f 75 6e |1.&... backgroun| 000060e0 64 25 20 3d 20 b9 20 8c 0d 26 d4 16 f2 73 65 74 |d% = . ..&...set| 000060f0 62 61 63 6b 67 72 6f 75 6e 64 6d 61 73 6b 0d 26 |backgroundmask.&| 00006100 de 11 f2 73 6c 61 62 6f 75 74 69 63 6f 6e 73 0d |...slabouticons.| 00006110 26 e8 33 f2 73 65 74 74 69 74 6c 65 62 61 72 28 |&.3.settitlebar(| 00006120 66 69 74 74 69 6e 67 25 2c 22 46 69 74 74 69 6e |fitting%,"Fittin| 00006130 67 20 77 6f 72 64 20 22 2b 6e 65 77 77 6f 72 64 |g word "+newword| 00006140 24 29 0d 26 f2 10 f2 6f 70 65 6e 66 69 74 74 69 |$).&...openfitti| 00006150 6e 67 0d 26 fc 05 cc 0d 27 06 15 c8 99 20 22 48 |ng.&....'.... "H| 00006160 6f 75 72 67 6c 61 73 73 5f 4f 6e 22 0d 27 10 05 |ourglass_On".'..| 00006170 cd 0d 27 1a 14 e3 20 76 65 72 74 25 20 3d 20 2d |..'... vert% = -| 00006180 31 20 b8 20 31 0d 27 24 15 e3 20 68 6f 72 69 7a |1 . 1.'$.. horiz| 00006190 25 20 3d 20 2d 31 20 b8 20 31 0d 27 2e 25 e7 20 |% = -1 . 1.'.%. | 000061a0 ac 20 28 20 68 6f 72 69 7a 25 20 3d 20 30 20 80 |. ( horiz% = 0 .| 000061b0 20 76 65 72 74 25 20 3d 20 30 20 29 20 20 8c 0d | vert% = 0 ) ..| 000061c0 27 38 30 f4 20 55 6e 66 6f 72 74 75 6e 61 6c 65 |'80. Unfortunale| 000061d0 6c 79 20 46 4f 52 2e 2e 2e 2e 4e 45 58 54 20 77 |ly FOR....NEXT w| 000061e0 6f 6e 27 74 20 64 6f 20 74 68 69 73 2e 2e 2e 0d |on't do this....| 000061f0 27 42 10 78 25 20 3d 20 78 73 74 61 72 74 25 0d |'B.x% = xstart%.| 00006200 27 4c 05 f5 0d 27 56 13 e7 20 62 61 63 6b 67 72 |'L...'V.. backgr| 00006210 6f 75 6e 64 25 20 8c 0d 27 60 1a c8 8e 20 a4 61 |ound% ..'`... .a| 00006220 63 74 69 6f 6e 28 66 69 74 74 69 6e 67 25 29 20 |ction(fitting%) | 00006230 ca 0d 27 6a 36 c9 20 22 43 61 6e 63 65 6c 22 20 |..'j6. "Cancel" | 00006240 3a f2 63 6c 6f 73 65 6f 6e 63 6c 69 63 6b 28 66 |:.closeonclick(f| 00006250 69 74 74 69 6e 67 25 29 3a f2 72 65 73 65 74 6d |itting%):.resetm| 00006260 61 73 6b 3a 3d 22 22 0d 27 74 3f c9 20 22 43 61 |ask:="".'t?. "Ca| 00006270 6e 63 65 6c 61 75 74 6f 22 3a f2 63 6c 6f 73 65 |ncelauto":.close| 00006280 6f 6e 63 6c 69 63 6b 28 66 69 74 74 69 6e 67 25 |onclick(fitting%| 00006290 29 3a f2 72 65 73 65 74 6d 61 73 6b 3a 3d 22 43 |):.resetmask:="C| 000062a0 61 6e 63 65 6c 22 0d 27 7e 05 cb 0d 27 88 05 cd |ancel".'~...'...| 000062b0 0d 27 92 10 79 25 20 3d 20 79 73 74 61 72 74 25 |.'..y% = ystart%| 000062c0 0d 27 9c 05 f5 0d 27 a6 3a 74 68 69 73 70 72 69 |.'....'.:thispri| 000062d0 6f 72 69 74 79 25 20 3d 20 a4 70 72 69 6f 72 69 |ority% = .priori| 000062e0 74 79 28 78 25 2c 79 25 2c 76 65 72 74 25 2c 68 |ty(x%,y%,vert%,h| 000062f0 6f 72 69 7a 25 2c 6e 65 77 77 6f 72 64 24 29 0d |oriz%,newword$).| 00006300 27 b0 93 e7 20 28 62 69 61 73 25 20 80 20 74 68 |'... (bias% . th| 00006310 69 73 70 72 69 6f 72 69 74 79 25 20 3e 20 70 72 |ispriority% > pr| 00006320 69 6f 72 69 74 79 25 29 20 84 20 28 28 ac 20 62 |iority%) . ((. b| 00006330 69 61 73 25 29 20 80 20 72 61 6e 25 3d 31 20 20 |ias%) . ran%=1 | 00006340 80 20 74 68 69 73 70 72 69 6f 72 69 74 79 25 20 |. thispriority% | 00006350 3e 20 70 72 69 6f 72 69 74 79 25 29 20 84 20 28 |> priority%) . (| 00006360 28 ac 20 62 69 61 73 25 29 20 80 20 72 61 6e 25 |(. bias%) . ran%| 00006370 3d 32 20 80 20 74 68 69 73 70 72 69 6f 72 69 74 |=2 . thispriorit| 00006380 79 25 20 3e 3d 20 70 72 69 6f 72 69 74 79 25 29 |y% >= priority%)| 00006390 20 8c 0d 27 ba 1d 70 72 69 6f 72 69 74 79 25 20 | ..'..priority% | 000063a0 3d 20 74 68 69 73 70 72 69 6f 72 69 74 79 25 0d |= thispriority%.| 000063b0 27 c4 18 64 65 63 69 64 65 64 76 65 72 74 25 20 |'..decidedvert% | 000063c0 3d 20 76 65 72 74 25 0d 27 ce 1a 64 65 63 69 64 |= vert%.'..decid| 000063d0 65 64 68 6f 72 69 7a 25 20 3d 20 68 6f 72 69 7a |edhoriz% = horiz| 000063e0 25 0d 27 d8 12 64 65 63 69 64 65 64 78 25 20 3d |%.'..decidedx% =| 000063f0 20 78 25 0d 27 e2 12 64 65 63 69 64 65 64 79 25 | x%.'..decidedy%| 00006400 20 3d 20 79 25 0d 27 ec 50 e7 20 70 72 69 6f 72 | = y%.'.P. prior| 00006410 69 74 79 25 20 3e 20 2d 31 20 80 20 63 68 61 6e |ity% > -1 . chan| 00006420 67 65 64 25 20 3d 20 a3 20 8c 20 79 25 3d 79 73 |ged% = . . y%=ys| 00006430 74 61 72 74 25 2d 31 3a 78 25 3d 78 73 74 61 72 |tart%-1:x%=xstar| 00006440 74 25 2d 31 3a 68 6f 72 69 7a 25 3d 31 3a 76 65 |t%-1:horiz%=1:ve| 00006450 72 74 25 3d 31 0d 27 f6 05 cd 0d 28 00 26 e7 20 |rt%=1.'....(.&. | 00006460 79 25 20 3e 20 30 20 8c 20 79 25 20 2d 3d 20 31 |y% > 0 . y% -= 1| 00006470 20 8b 20 79 25 20 3d 20 79 73 69 7a 65 25 2b 31 | . y% = ysize%+1| 00006480 0d 28 0a 12 fd 20 79 25 20 3d 20 79 73 74 61 72 |.(... y% = ystar| 00006490 74 25 0d 28 14 26 e7 20 78 25 20 3e 20 30 20 8c |t%.(.&. x% > 0 .| 000064a0 20 78 25 20 2d 3d 20 31 20 8b 20 78 25 20 3d 20 | x% -= 1 . x% = | 000064b0 78 73 69 7a 65 25 2b 31 0d 28 1e 12 fd 20 78 25 |xsize%+1.(... x%| 000064c0 20 3d 20 78 73 74 61 72 74 25 0d 28 28 05 cd 0d | = xstart%.((...| 000064d0 28 32 0c ed 20 68 6f 72 69 7a 25 0d 28 3c 0b ed |(2.. horiz%.(<..| 000064e0 20 76 65 72 74 25 0d 28 46 17 e7 20 62 61 63 6b | vert%.(F.. back| 000064f0 67 72 6f 75 6e 64 25 20 3d 20 b9 20 8c 0d 28 50 |ground% = . ..(P| 00006500 1b f2 63 6c 6f 73 65 6f 6e 63 6c 69 63 6b 28 66 |..closeonclick(f| 00006510 69 74 74 69 6e 67 25 29 0d 28 5a 0e f2 72 65 73 |itting%).(Z..res| 00006520 65 74 6d 61 73 6b 0d 28 64 05 cc 0d 28 6e 16 c8 |etmask.(d...(n..| 00006530 99 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 |. "Hourglass_Off| 00006540 22 0d 28 78 05 cd 0d 28 82 15 e7 20 73 6f 75 72 |".(x...(... sour| 00006550 63 65 24 20 3d 20 22 49 22 20 8c 0d 28 8c 3a e7 |ce$ = "I" ..(.:.| 00006560 20 70 72 69 6f 72 69 74 79 25 20 3d 20 2d 31 20 | priority% = -1 | 00006570 8c 20 f2 6f 6b 28 22 53 6f 72 72 79 2c 20 77 6f |. .ok("Sorry, wo| 00006580 72 64 20 77 6f 6e 27 74 20 66 69 74 21 22 29 20 |rd won't fit!") | 00006590 3a 20 3d 22 22 0d 28 96 05 cc 0d 28 a0 16 e7 20 |: ="".(....(... | 000065a0 70 72 69 6f 72 69 74 79 25 20 3d 20 2d 31 20 8c |priority% = -1 .| 000065b0 0d 28 aa 13 66 61 69 6c 63 6f 75 6e 74 25 20 2b |.(..failcount% +| 000065c0 3d 20 31 0d 28 b4 07 3d 22 22 0d 28 be 05 cc 0d |= 1.(..="".(....| 000065d0 28 c8 12 66 61 69 6c 63 6f 75 6e 74 25 20 3d 20 |(..failcount% = | 000065e0 30 0d 28 d2 05 cd 0d 28 dc 05 cd 0d 28 e6 17 6e |0.(....(....(..n| 000065f0 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 64 73 25 2b |umber_of_words%+| 00006600 3d 31 0d 28 f0 27 66 69 74 71 75 61 6c 69 74 79 |=1.(.'fitquality| 00006610 20 2b 3d 20 a9 28 6e 65 77 77 6f 72 64 24 29 2d | += .(newword$)-| 00006620 70 72 69 6f 72 69 74 79 25 0d 28 fa 1f e3 20 6c |priority%.(... l| 00006630 65 74 74 65 72 25 20 3d 20 31 20 b8 20 a9 28 6e |etter% = 1 . .(n| 00006640 65 77 77 6f 72 64 24 29 0d 29 04 64 67 72 69 64 |ewword$).).dgrid| 00006650 24 28 64 65 63 69 64 65 64 78 25 2b 28 6c 65 74 |$(decidedx%+(let| 00006660 74 65 72 25 2a 64 65 63 69 64 65 64 68 6f 72 69 |ter%*decidedhori| 00006670 7a 25 29 2c 64 65 63 69 64 65 64 79 25 2b 28 6c |z%),decidedy%+(l| 00006680 65 74 74 65 72 25 2a 64 65 63 69 64 65 64 76 65 |etter%*decidedve| 00006690 72 74 25 29 29 20 3d 20 c1 6e 65 77 77 6f 72 64 |rt%)) = .newword| 000066a0 24 2c 6c 65 74 74 65 72 25 2c 31 29 0d 29 0e 55 |$,letter%,1).).U| 000066b0 6e 75 6d 62 65 72 73 25 28 64 65 63 69 64 65 64 |numbers%(decided| 000066c0 78 25 2b 28 6c 65 74 74 65 72 25 2a 64 65 63 69 |x%+(letter%*deci| 000066d0 64 65 64 68 6f 72 69 7a 25 29 2c 64 65 63 69 64 |dedhoriz%),decid| 000066e0 65 64 79 25 2b 28 6c 65 74 74 65 72 25 2a 64 65 |edy%+(letter%*de| 000066f0 63 69 64 65 64 76 65 72 74 25 29 29 20 2b 3d 20 |cidedvert%)) += | 00006700 31 0d 29 18 0d ed 20 6c 65 74 74 65 72 25 0d 29 |1.)... letter%.)| 00006710 22 27 77 6f 72 64 73 24 28 6e 75 6d 62 65 72 5f |"'words$(number_| 00006720 6f 66 5f 77 6f 72 64 73 25 29 20 3d 20 6e 65 77 |of_words%) = new| 00006730 77 6f 72 64 24 0d 29 2c 29 77 6f 72 64 73 78 25 |word$.),)wordsx%| 00006740 28 6e 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 64 73 |(number_of_words| 00006750 25 29 20 3d 20 64 65 63 69 64 65 64 78 25 0d 29 |%) = decidedx%.)| 00006760 36 29 77 6f 72 64 73 79 25 28 6e 75 6d 62 65 72 |6)wordsy%(number| 00006770 5f 6f 66 5f 77 6f 72 64 73 25 29 20 3d 20 64 65 |_of_words%) = de| 00006780 63 69 64 65 64 79 25 0d 29 40 2f 77 6f 72 64 73 |cidedy%.)@/words| 00006790 76 65 72 74 25 28 6e 75 6d 62 65 72 5f 6f 66 5f |vert%(number_of_| 000067a0 77 6f 72 64 73 25 29 20 3d 20 64 65 63 69 64 65 |words%) = decide| 000067b0 64 76 65 72 74 25 0d 29 4a 31 77 6f 72 64 73 68 |dvert%.)J1wordsh| 000067c0 6f 72 69 7a 25 28 6e 75 6d 62 65 72 5f 6f 66 5f |oriz%(number_of_| 000067d0 77 6f 72 64 73 25 29 20 3d 20 64 65 63 69 64 65 |words%) = decide| 000067e0 64 68 6f 72 69 7a 25 0d 29 54 31 6c 6f 6e 67 65 |dhoriz%.)T1longe| 000067f0 73 74 77 6f 72 64 25 20 3d 20 a4 6d 61 78 28 6c |stword% = .max(l| 00006800 6f 6e 67 65 73 74 77 6f 72 64 25 2c a9 28 6e 65 |ongestword%,.(ne| 00006810 77 77 6f 72 64 24 29 29 0d 29 5e 10 63 68 61 6e |wword$)).)^.chan| 00006820 67 65 64 25 20 3d 20 b9 0d 29 68 0e 73 61 76 65 |ged% = ..)h.save| 00006830 64 25 20 3d 20 a3 0d 29 72 10 f2 75 70 64 61 74 |d% = ..)r..updat| 00006840 65 77 6f 72 64 73 0d 29 7c 12 f2 75 70 64 61 74 |ewords.)|..updat| 00006850 65 67 72 69 64 28 30 29 0d 29 86 14 f2 75 70 64 |egrid(0).)...upd| 00006860 61 74 65 71 75 61 6c 69 74 69 65 73 0d 29 90 07 |atequalities.)..| 00006870 3d 22 22 0d 29 9a 04 0d 29 a4 2c dd 20 a4 70 72 |="".)...).,. .pr| 00006880 69 6f 72 69 74 79 28 78 25 2c 79 25 2c 76 65 72 |iority(x%,y%,ver| 00006890 74 25 2c 68 6f 72 69 7a 25 2c 6e 65 77 77 6f 72 |t%,horiz%,newwor| 000068a0 64 24 29 0d 29 ae 24 f4 20 63 68 65 63 6b 20 70 |d$).).$. check p| 000068b0 72 69 6f 72 69 74 79 20 6f 66 20 77 6f 72 64 20 |riority of word | 000068c0 70 6c 61 63 69 6e 67 0d 29 b8 17 ea 20 70 72 69 |placing.)... pri| 000068d0 6f 72 69 74 79 25 2c 6c 65 74 74 65 72 25 0d 29 |ority%,letter%.)| 000068e0 c2 2b f4 20 43 68 65 63 6b 20 77 6f 72 64 20 69 |.+. Check word i| 000068f0 73 20 77 69 74 68 69 6e 20 67 72 69 64 20 62 6f |s within grid bo| 00006900 75 6e 64 61 72 69 65 73 2e 0d 29 cc 80 e7 28 78 |undaries..)...(x| 00006910 25 2b 28 68 6f 72 69 7a 25 2a a9 28 6e 65 77 77 |%+(horiz%*.(neww| 00006920 6f 72 64 24 29 29 3e 78 73 69 7a 65 25 29 84 28 |ord$))>xsize%).(| 00006930 78 25 2b 28 68 6f 72 69 7a 25 2a a9 28 6e 65 77 |x%+(horiz%*.(new| 00006940 77 6f 72 64 24 29 29 3c 3d 30 29 84 28 79 25 2b |word$))<=0).(y%+| 00006950 28 76 65 72 74 25 2a a9 28 6e 65 77 77 6f 72 64 |(vert%*.(newword| 00006960 24 29 29 3e 79 73 69 7a 65 25 29 84 28 79 25 2b |$))>ysize%).(y%+| 00006970 28 76 65 72 74 25 2a a9 28 6e 65 77 77 6f 72 64 |(vert%*.(newword| 00006980 24 29 29 3c 3d 30 29 20 8c 0d 29 d6 08 3d 20 2d |$))<=0) ..)..= -| 00006990 31 0d 29 e0 05 cd 0d 29 ea 12 70 72 69 6f 72 69 |1.)....)..priori| 000069a0 74 79 25 20 3d 20 2d 31 0d 29 f4 51 f4 20 43 68 |ty% = -1.).Q. Ch| 000069b0 65 63 6b 20 69 66 20 65 61 63 68 20 73 70 61 63 |eck if each spac| 000069c0 65 20 69 73 20 65 6d 70 74 79 2c 20 64 69 66 66 |e is empty, diff| 000069d0 65 72 65 6e 74 20 6f 72 20 74 68 65 20 73 61 6d |erent or the sam| 000069e0 65 20 61 73 20 6c 65 74 74 65 72 73 20 69 6e 20 |e as letters in | 000069f0 74 68 65 20 77 6f 72 64 2e 0d 29 fe 1f e3 20 6c |the word..)... l| 00006a00 65 74 74 65 72 25 20 3d 20 31 20 b8 20 a9 28 6e |etter% = 1 . .(n| 00006a10 65 77 77 6f 72 64 24 29 0d 2a 08 36 c8 8e 20 67 |ewword$).*.6.. g| 00006a20 72 69 64 24 28 78 25 2b 28 68 6f 72 69 7a 25 2a |rid$(x%+(horiz%*| 00006a30 6c 65 74 74 65 72 25 29 2c 79 25 2b 28 76 65 72 |letter%),y%+(ver| 00006a40 74 25 2a 6c 65 74 74 65 72 25 29 29 20 ca 0d 2a |t%*letter%)) ..*| 00006a50 12 4d c9 20 c1 6e 65 77 77 6f 72 64 24 2c 6c 65 |.M. .newword$,le| 00006a60 74 74 65 72 25 2c 31 29 20 3a 20 e7 20 70 72 69 |tter%,1) : . pri| 00006a70 6f 72 69 74 79 25 20 3c 20 30 20 8c 20 70 72 69 |ority% < 0 . pri| 00006a80 6f 72 69 74 79 25 20 3d 20 31 20 8b 20 70 72 69 |ority% = 1 . pri| 00006a90 6f 72 69 74 79 25 20 2b 3d 20 31 0d 2a 1c 26 c9 |ority% += 1.*.&.| 00006aa0 20 22 22 20 3a 20 e7 20 70 72 69 6f 72 69 74 79 | "" : . priority| 00006ab0 25 20 3c 20 30 20 70 72 69 6f 72 69 74 79 25 3d |% < 0 priority%=| 00006ac0 30 0d 2a 26 2e 7f 20 3a 20 70 72 69 6f 72 69 74 |0.*&.. : priorit| 00006ad0 79 25 20 3d 20 2d 31 20 3a 20 6c 65 74 74 65 72 |y% = -1 : letter| 00006ae0 25 20 3d 20 a9 28 6e 65 77 77 6f 72 64 24 29 0d |% = .(newword$).| 00006af0 2a 30 05 cb 0d 2a 3a 0d ed 20 6c 65 74 74 65 72 |*0...*:.. letter| 00006b00 25 0d 2a 44 3d f4 20 4e 65 78 74 20 6c 69 6e 65 |%.*D=. Next line| 00006b10 20 74 61 6b 65 73 20 63 61 72 65 20 6f 66 20 74 | takes care of t| 00006b20 68 65 20 73 61 6d 65 20 77 6f 72 64 20 62 65 69 |he same word bei| 00006b30 6e 67 20 75 73 65 64 20 74 77 69 63 65 2e 0d 2a |ng used twice..*| 00006b40 4e 1f e7 20 70 72 69 6f 72 69 74 79 25 20 3d 20 |N.. priority% = | 00006b50 a9 28 6e 65 77 77 6f 72 64 24 29 20 8c 0d 2a 58 |.(newword$) ..*X| 00006b60 08 3d 20 2d 31 0d 2a 62 05 cd 0d 2a 6c 0e 3d 70 |.= -1.*b...*l.=p| 00006b70 72 69 6f 72 69 74 79 25 0d 2a 76 04 0d 2a 80 0f |riority%.*v..*..| 00006b80 dd 20 f2 6e 65 77 5f 67 72 69 64 0d 2a 8a 16 f4 |. .new_grid.*...| 00006b90 20 70 72 65 70 61 72 65 20 6e 65 77 20 67 72 69 | prepare new gri| 00006ba0 64 0d 2a 94 55 e7 20 a9 28 a4 74 65 78 74 66 72 |d.*.U. .(.textfr| 00006bb0 6f 6d 77 72 69 74 61 62 6c 65 28 6e 65 77 67 72 |omwritable(newgr| 00006bc0 69 64 25 2c 32 29 29 20 3c 20 31 20 84 20 a9 28 |id%,2)) < 1 . .(| 00006bd0 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c |.textfromwritabl| 00006be0 65 28 6e 65 77 67 72 69 64 25 2c 33 29 29 20 3c |e(newgrid%,3)) <| 00006bf0 20 31 20 8c 20 e1 0d 2a 9e cf e7 20 a8 28 a0 28 | 1 . ..*... .(.(| 00006c00 a4 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c |.textfromwritabl| 00006c10 65 28 6e 65 77 67 72 69 64 25 2c 32 29 29 29 20 |e(newgrid%,2))) | 00006c20 3e 20 32 30 20 84 20 a8 28 a0 28 a4 74 65 78 74 |> 20 . .(.(.text| 00006c30 66 72 6f 6d 77 72 69 74 61 62 6c 65 28 6e 65 77 |fromwritable(new| 00006c40 67 72 69 64 25 2c 32 29 29 29 20 3c 20 30 20 84 |grid%,2))) < 0 .| 00006c50 20 a8 28 a0 28 a4 74 65 78 74 66 72 6f 6d 77 72 | .(.(.textfromwr| 00006c60 69 74 61 62 6c 65 28 6e 65 77 67 72 69 64 25 2c |itable(newgrid%,| 00006c70 33 29 29 29 20 3e 20 32 30 84 20 a8 28 a0 28 a4 |3))) > 20. .(.(.| 00006c80 74 65 78 74 66 72 6f 6d 77 72 69 74 61 62 6c 65 |textfromwritable| 00006c90 28 6e 65 77 67 72 69 64 25 2c 33 29 29 29 20 3c |(newgrid%,3))) <| 00006ca0 20 30 20 8c 20 85 20 32 32 33 2c 20 22 53 69 7a | 0 . . 223, "Siz| 00006cb0 65 20 6d 75 73 74 20 62 65 20 32 30 20 6f 72 20 |e must be 20 or | 00006cc0 6c 65 73 73 22 0d 2a a8 15 c8 99 20 22 48 6f 75 |less".*.... "Hou| 00006cd0 72 67 6c 61 73 73 5f 4f 6e 22 0d 2a b2 0e f2 63 |rglass_On".*...c| 00006ce0 6c 65 61 72 67 72 69 64 0d 2a bc 2e 78 73 69 7a |leargrid.*..xsiz| 00006cf0 65 25 3d a8 28 a0 28 a4 74 65 78 74 66 72 6f 6d |e%=.(.(.textfrom| 00006d00 77 72 69 74 61 62 6c 65 28 6e 65 77 67 72 69 64 |writable(newgrid| 00006d10 25 2c 32 29 29 29 0d 2a c6 2e 79 73 69 7a 65 25 |%,2))).*..ysize%| 00006d20 3d a8 28 a0 28 a4 74 65 78 74 66 72 6f 6d 77 72 |=.(.(.textfromwr| 00006d30 69 74 61 62 6c 65 28 6e 65 77 67 72 69 64 25 2c |itable(newgrid%,| 00006d40 33 29 29 29 0d 2a d0 18 ea 20 78 25 2c 79 25 2c |3))).*... x%,y%,| 00006d50 69 25 2c 74 68 69 73 77 6f 72 64 25 0d 2a da 1f |i%,thisword%.*..| 00006d60 e3 20 74 68 69 73 77 6f 72 64 25 20 3d 20 31 20 |. thisword% = 1 | 00006d70 b8 20 6d 61 78 77 6f 72 64 73 25 0d 2a e4 1a 77 |. maxwords%.*..w| 00006d80 6f 72 64 73 24 28 74 68 69 73 77 6f 72 64 25 29 |ords$(thisword%)| 00006d90 20 3d 20 22 22 0d 2a ee 0f ed 20 74 68 69 73 77 | = "".*... thisw| 00006da0 6f 72 64 25 0d 2a f8 18 6e 75 6d 62 65 72 5f 6f |ord%.*..number_o| 00006db0 66 5f 77 6f 72 64 73 25 20 3d 20 30 0d 2b 02 14 |f_words% = 0.+..| 00006dc0 6c 6f 6e 67 65 73 74 77 6f 72 64 25 20 3d 20 30 |longestword% = 0| 00006dd0 0d 2b 0c 12 66 69 74 71 75 61 6c 69 74 79 20 3d |.+..fitquality =| 00006de0 20 30 0d 2b 16 16 70 6f 73 73 69 62 6c 65 66 69 | 0.+..possiblefi| 00006df0 6c 6c 73 25 20 3d 20 30 0d 2b 20 13 61 63 74 75 |lls% = 0.+ .actu| 00006e00 61 6c 66 69 6c 6c 73 20 3d 20 30 0d 2b 2a 13 e3 |alfills = 0.+*..| 00006e10 20 78 25 3d 31 20 b8 20 78 73 69 7a 65 25 0d 2b | x%=1 . xsize%.+| 00006e20 34 13 e3 20 79 25 3d 31 20 b8 20 79 73 69 7a 65 |4.. y%=1 . ysize| 00006e30 25 0d 2b 3e 15 67 72 69 64 24 28 78 25 2c 79 25 |%.+>.grid$(x%,y%| 00006e40 29 20 3d 20 22 22 0d 2b 48 08 ed 20 79 25 0d 2b |) = "".+H.. y%.+| 00006e50 52 08 ed 20 78 25 0d 2b 5c 14 67 72 69 64 64 65 |R.. x%.+\.gridde| 00006e60 66 69 6e 65 64 25 20 3d 20 b9 0d 2b 66 10 63 68 |fined% = ..+f.ch| 00006e70 61 6e 67 65 64 25 20 3d 20 a3 0d 2b 70 0e 73 61 |anged% = ..+p.sa| 00006e80 76 65 64 25 20 3d 20 a3 0d 2b 7a 12 f2 75 70 64 |ved% = ..+z..upd| 00006e90 61 74 65 67 72 69 64 28 30 29 0d 2b 84 10 f2 75 |ategrid(0).+...u| 00006ea0 70 64 61 74 65 77 6f 72 64 73 0d 2b 8e 0d f2 6f |pdatewords.+...o| 00006eb0 70 65 6e 67 72 69 64 0d 2b 98 13 f2 63 6c 65 61 |pengrid.+...clea| 00006ec0 72 71 75 61 6c 69 74 69 65 73 0d 2b a2 16 c8 99 |rqualities.+....| 00006ed0 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 | "Hourglass_Off"| 00006ee0 0d 2b ac 05 e1 0d 2b b6 04 0d 2b c0 0c dd 20 f2 |.+....+...+... .| 00006ef0 70 72 69 6e 74 0d 2b ca 10 f4 20 70 72 69 6e 74 |print.+... print| 00006f00 20 67 72 69 64 0d 2b d4 21 ea 20 6c 69 6e 65 25 | grid.+.!. line%| 00006f10 2c 77 6f 72 64 25 2c 73 31 24 2c 73 32 24 2c 6f |,word%,s1$,s2$,o| 00006f20 6e 6c 69 6e 65 25 0d 2b de 15 c8 99 20 22 48 6f |nline%.+.... "Ho| 00006f30 75 72 67 6c 61 73 73 5f 4f 6e 22 0d 2b e8 05 f5 |urglass_On".+...| 00006f40 0d 2b f2 1a 6f 6e 6c 69 6e 65 25 20 3d 20 a4 69 |.+..online% = .i| 00006f50 73 70 72 69 6e 74 65 72 6f 6e 0d 2b fc 58 e7 20 |sprinteron.+.X. | 00006f60 6f 6e 6c 69 6e 65 25 20 3d 20 a3 20 8c 20 e7 20 |online% = . . . | 00006f70 ac 20 a4 79 6f 72 6e 28 22 50 72 69 6e 74 65 72 |. .yorn("Printer| 00006f80 20 69 73 20 6f 66 66 6c 69 6e 65 2e 20 54 72 79 | is offline. Try| 00006f90 20 61 67 61 69 6e 3f 22 29 20 8c 20 c8 99 20 22 | again?") . .. "| 00006fa0 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 20 3a |Hourglass_Off" :| 00006fb0 20 e1 0d 2c 06 11 fd 20 6f 6e 6c 69 6e 65 25 20 | ..,... online% | 00006fc0 3d 20 b9 0d 2c 10 07 ef 20 32 0d 2c 1a 07 f1 20 |= ..,... 2.,... | 00006fd0 27 0d 2c 24 18 e3 20 6c 69 6e 65 25 20 3d 20 31 |'.,$.. line% = 1| 00006fe0 20 b8 20 79 73 69 7a 65 25 0d 2c 2e 1a f1 20 a4 | . ysize%.,... .| 00006ff0 67 72 69 64 74 6f 73 74 72 69 6e 67 28 6c 69 6e |gridtostring(lin| 00007000 65 25 29 0d 2c 38 0b ed 20 6c 69 6e 65 25 0d 2c |e%).,8.. line%.,| 00007010 42 07 f1 20 27 0d 2c 4c 27 e3 20 77 6f 72 64 25 |B.. '.,L'. word%| 00007020 20 3d 20 31 20 b8 20 a8 28 6e 75 6d 62 65 72 5f | = 1 . .(number_| 00007030 6f 66 5f 77 6f 72 64 73 25 2f 33 29 0d 2c 56 7b |of_words%/3).,V{| 00007040 f1 77 6f 72 64 73 24 28 77 6f 72 64 25 29 3b 89 |.words$(word%);.| 00007050 28 32 35 2d a9 28 77 6f 72 64 73 24 28 77 6f 72 |(25-.(words$(wor| 00007060 64 25 29 29 29 3b 77 6f 72 64 73 24 28 77 6f 72 |d%)));words$(wor| 00007070 64 25 2b 31 29 3b 89 28 32 35 2d a9 28 77 6f 72 |d%+1);.(25-.(wor| 00007080 64 73 24 28 77 6f 72 64 25 2b 31 29 29 29 3b 77 |ds$(word%+1)));w| 00007090 6f 72 64 73 24 28 77 6f 72 64 25 2b 32 29 3b 89 |ords$(word%+2);.| 000070a0 28 32 35 2d a9 28 77 6f 72 64 73 24 28 77 6f 72 |(25-.(words$(wor| 000070b0 64 25 2b 32 29 29 29 0d 2c 60 0b ed 20 77 6f 72 |d%+2))).,`.. wor| 000070c0 64 25 0d 2c 6a 07 f1 20 27 0d 2c 74 3a 73 31 24 |d%.,j.. '.,t:s1$| 000070d0 3d 22 57 6f 72 64 20 66 69 74 74 69 6e 67 20 71 |="Word fitting q| 000070e0 75 61 6c 69 74 79 20 69 73 20 22 2b a4 77 6f 72 |uality is "+.wor| 000070f0 64 71 75 61 6c 69 74 79 73 74 72 69 6e 67 2b 22 |dqualitystring+"| 00007100 3a 31 22 0d 2c 7e 38 73 32 24 3d 22 47 61 70 20 |:1".,~8s2$="Gap | 00007110 66 69 6c 6c 69 6e 67 20 71 75 61 6c 69 74 79 20 |filling quality | 00007120 69 73 20 22 2b a4 66 69 6c 6c 71 75 61 6c 69 74 |is "+.fillqualit| 00007130 79 73 74 72 69 6e 67 2b 22 25 22 0d 2c 88 09 f1 |ystring+"%".,...| 00007140 20 73 31 24 0d 2c 92 09 f1 20 73 32 24 0d 2c 9c | s1$.,... s2$.,.| 00007150 07 ef 20 33 0d 2c a6 16 c8 99 20 22 48 6f 75 72 |.. 3.,.... "Hour| 00007160 67 6c 61 73 73 5f 4f 66 66 22 0d 2c b0 05 e1 0d |glass_Off".,....| 00007170 2c ba 04 0d 2c c4 1c dd 20 f2 73 61 76 65 61 73 |,...,... .saveas| 00007180 74 65 78 74 28 66 69 6c 65 6e 61 6d 65 24 29 0d |text(filename$).| 00007190 2c ce 1b f4 20 42 69 74 20 73 69 6d 69 6c 61 72 |,... Bit similar| 000071a0 20 74 6f 20 61 62 6f 76 65 21 0d 2c d8 52 e7 20 | to above!.,.R. | 000071b0 a4 64 6f 65 73 66 69 6c 65 65 78 69 73 74 28 66 |.doesfileexist(f| 000071c0 69 6c 65 6e 61 6d 65 24 29 20 8c 20 e7 20 ac 20 |ilename$) . . . | 000071d0 a4 79 6f 72 6e 28 22 46 69 6c 65 20 61 6c 72 65 |.yorn("File alre| 000071e0 61 64 79 20 65 78 69 73 74 73 2e 20 4f 76 65 72 |ady exists. Over| 000071f0 77 72 69 74 65 3f 22 29 20 8c 20 e1 0d 2c e2 11 |write?") . ..,..| 00007200 ea 20 6c 69 6e 65 25 2c 77 6f 72 64 25 0d 2c ec |. line%,word%.,.| 00007210 4f e7 20 a4 64 6f 65 73 66 69 6c 65 65 78 69 73 |O. .doesfileexis| 00007220 74 28 66 69 6c 65 6e 61 6d 65 24 29 20 8c 20 c8 |t(filename$) . .| 00007230 99 20 22 4f 53 5f 46 69 6c 65 22 2c 26 30 36 2c |. "OS_File",&06,| 00007240 66 69 6c 65 6e 61 6d 65 24 20 3a f4 20 44 65 6c |filename$ :. Del| 00007250 65 74 65 20 6f 6c 64 20 66 69 6c 65 0d 2c f6 37 |ete old file.,.7| 00007260 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 26 30 42 |.. "OS_File",&0B| 00007270 2c 66 69 6c 65 6e 61 6d 65 24 2c 26 46 46 46 20 |,filename$,&FFF | 00007280 20 20 3a f4 20 43 72 65 61 74 65 20 6e 65 77 20 | :. Create new | 00007290 6f 6e 65 0d 2d 00 1b 74 65 78 74 66 69 6c 65 20 |one.-..textfile | 000072a0 3d 20 ad 28 66 69 6c 65 6e 61 6d 65 24 29 0d 2d |= .(filename$).-| 000072b0 0a 18 e3 20 6c 69 6e 65 25 20 3d 20 31 20 b8 20 |... line% = 1 . | 000072c0 79 73 69 7a 65 25 0d 2d 14 23 d5 23 74 65 78 74 |ysize%.-.#.#text| 000072d0 66 69 6c 65 2c a4 67 72 69 64 74 6f 73 74 72 69 |file,.gridtostri| 000072e0 6e 67 28 6c 69 6e 65 25 29 0d 2d 1e 0b ed 20 6c |ng(line%).-... l| 000072f0 69 6e 65 25 0d 2d 28 1b d5 23 74 65 78 74 66 69 |ine%.-(..#textfi| 00007300 6c 65 2c 22 20 22 20 20 20 3a 20 f4 20 43 52 0d |le," " : . CR.| 00007310 2d 32 22 e3 20 77 6f 72 64 25 20 3d 20 31 20 b8 |-2". word% = 1 .| 00007320 20 6e 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 64 73 | number_of_words| 00007330 25 0d 2d 3c 1c d5 23 74 65 78 74 66 69 6c 65 2c |%.-<..#textfile,| 00007340 77 6f 72 64 73 24 28 77 6f 72 64 25 29 0d 2d 46 |words$(word%).-F| 00007350 0b ed 20 77 6f 72 64 25 0d 2d 50 10 e7 20 63 68 |.. word%.-P.. ch| 00007360 61 6e 67 65 64 25 20 8c 0d 2d 5a 1b d5 23 74 65 |anged% ..-Z..#te| 00007370 78 74 66 69 6c 65 2c 22 20 22 20 20 20 3a 20 f4 |xtfile," " : .| 00007380 20 43 52 0d 2d 64 41 d5 23 74 65 78 74 66 69 6c | CR.-dA.#textfil| 00007390 65 2c 22 57 6f 72 64 20 66 69 74 74 69 6e 67 20 |e,"Word fitting | 000073a0 71 75 61 6c 69 74 79 20 69 73 20 22 2b a4 77 6f |quality is "+.wo| 000073b0 72 64 71 75 61 6c 69 74 79 73 74 72 69 6e 67 2b |rdqualitystring+| 000073c0 22 3a 31 22 0d 2d 6e 3f d5 23 74 65 78 74 66 69 |":1".-n?.#textfi| 000073d0 6c 65 2c 22 47 61 70 20 66 69 6c 6c 69 6e 67 20 |le,"Gap filling | 000073e0 71 75 61 6c 69 74 79 20 69 73 20 22 2b a4 66 69 |quality is "+.fi| 000073f0 6c 6c 71 75 61 6c 69 74 79 73 74 72 69 6e 67 2b |llqualitystring+| 00007400 22 25 22 0d 2d 78 05 cd 0d 2d 82 0e d9 23 74 65 |"%".-x...-...#te| 00007410 78 74 66 69 6c 65 0d 2d 8c 05 e1 0d 2d 96 04 0d |xtfile.-....-...| 00007420 2d a0 1a dd 20 a4 67 72 69 64 74 6f 73 74 72 69 |-... .gridtostri| 00007430 6e 67 28 6c 69 6e 65 25 29 0d 2d aa 2d f4 20 52 |ng(line%).-.-. R| 00007440 65 74 75 72 6e 20 73 70 65 63 69 66 69 65 64 20 |eturn specified | 00007450 6c 69 6e 65 20 6f 66 20 67 72 69 64 20 61 73 20 |line of grid as | 00007460 73 74 72 69 6e 67 0d 2d b4 10 ea 20 73 74 72 69 |string.-... stri| 00007470 6e 67 24 2c 78 25 0d 2d be 15 e3 20 78 25 20 3d |ng$,x%.-... x% =| 00007480 20 31 20 b8 20 78 73 69 7a 65 25 0d 2d c8 42 e7 | 1 . xsize%.-.B.| 00007490 20 67 72 69 64 24 28 78 25 2c 6c 69 6e 65 25 29 | grid$(x%,line%)| 000074a0 3d 22 22 20 8c 20 73 74 72 69 6e 67 24 2b 3d 22 |="" . string$+="| 000074b0 2d 22 20 8b 20 73 74 72 69 6e 67 24 2b 3d 67 72 |-" . string$+=gr| 000074c0 69 64 24 28 78 25 2c 6c 69 6e 65 25 29 0d 2d d2 |id$(x%,line%).-.| 000074d0 08 ed 20 78 25 0d 2d dc 0c 3d 73 74 72 69 6e 67 |.. x%.-..=string| 000074e0 24 0d 2d e6 04 0d 2d f0 18 dd 20 f2 73 61 76 65 |$.-...-... .save| 000074f0 6f 70 74 69 6f 6e 73 28 62 75 74 25 29 0d 2d fa |options(but%).-.| 00007500 11 ea 20 6f 70 74 69 6f 6e 73 66 69 6c 65 0d 2e |.. optionsfile..| 00007510 04 29 6f 70 74 69 6f 6e 73 66 69 6c 65 20 3d 20 |.)optionsfile = | 00007520 ae 28 22 3c 57 6f 72 64 24 44 69 72 3e 2e 4f 70 |.("<Word$Dir>.Op| 00007530 74 69 6f 6e 73 22 29 0d 2e 0e 3d f1 23 6f 70 74 |tions")...=.#opt| 00007540 69 6f 6e 73 66 69 6c 65 2c 62 69 61 73 25 2c 6c |ionsfile,bias%,l| 00007550 65 74 74 65 72 66 69 6c 6c 25 2c 77 6f 72 64 70 |etterfill%,wordp| 00007560 61 72 74 66 69 6c 6c 25 2c 62 61 63 6b 67 72 6f |artfill%,backgro| 00007570 75 6e 64 25 0d 2e 18 12 d9 23 20 6f 70 74 69 6f |und%.....# optio| 00007580 6e 73 66 69 6c 65 0d 2e 22 28 e7 20 62 75 74 25 |nsfile.."(. but%| 00007590 20 3d 20 34 20 8c 20 f2 63 6c 6f 73 65 6f 6e 63 | = 4 . .closeonc| 000075a0 6c 69 63 6b 28 6f 70 74 69 6f 6e 73 25 29 0d 2e |lick(options%)..| 000075b0 2c 05 e1 0d 2e 36 04 0d 2e 40 11 dd f2 6c 6f 61 |,....6...@...loa| 000075c0 64 6f 70 74 69 6f 6e 73 0d 2e 4a 11 ea 20 6f 70 |doptions..J.. op| 000075d0 74 69 6f 6e 73 66 69 6c 65 0d 2e 54 29 6f 70 74 |tionsfile..T)opt| 000075e0 69 6f 6e 73 66 69 6c 65 20 3d 20 8e 28 22 3c 57 |ionsfile = .("<W| 000075f0 6f 72 64 24 44 69 72 3e 2e 4f 70 74 69 6f 6e 73 |ord$Dir>.Options| 00007600 22 29 0d 2e 5e 3d e8 23 6f 70 74 69 6f 6e 73 66 |")..^=.#optionsf| 00007610 69 6c 65 2c 62 69 61 73 25 2c 6c 65 74 74 65 72 |ile,bias%,letter| 00007620 66 69 6c 6c 25 2c 77 6f 72 64 70 61 72 74 66 69 |fill%,wordpartfi| 00007630 6c 6c 25 2c 62 61 63 6b 67 72 6f 75 6e 64 25 0d |ll%,background%.| 00007640 2e 68 12 d9 23 20 6f 70 74 69 6f 6e 73 66 69 6c |.h..# optionsfil| 00007650 65 0d 2e 72 05 e1 0d 2e 7c 04 0d 2e 86 16 dd 20 |e..r....|...... | 00007660 f2 73 61 76 65 67 72 69 64 28 70 61 74 68 24 29 |.savegrid(path$)| 00007670 0d 2e 90 0f f4 20 53 61 76 65 20 67 72 69 64 0d |..... Save grid.| 00007680 2e 9a 4e e7 20 a4 64 6f 65 73 66 69 6c 65 65 78 |..N. .doesfileex| 00007690 69 73 74 28 70 61 74 68 24 29 20 8c 20 e7 20 ac |ist(path$) . . .| 000076a0 20 a4 79 6f 72 6e 28 22 46 69 6c 65 20 61 6c 72 | .yorn("File alr| 000076b0 65 61 64 79 20 65 78 69 73 74 73 2e 20 4f 76 65 |eady exists. Ove| 000076c0 72 77 72 69 74 65 3f 22 29 20 8c 20 e1 0d 2e a4 |rwrite?") . ....| 000076d0 16 ea 20 66 69 6c 65 2c 78 25 2c 79 25 2c 77 6f |.. file,x%,y%,wo| 000076e0 72 64 25 0d 2e ae 13 66 69 6c 65 20 3d 20 ae 28 |rd%....file = .(| 000076f0 70 61 74 68 24 29 0d 2e b8 6c f1 23 66 69 6c 65 |path$)...l.#file| 00007700 2c 63 68 65 63 6b 24 2c 78 73 69 7a 65 25 2c 79 |,check$,xsize%,y| 00007710 73 69 7a 65 25 2c 6e 75 6d 62 65 72 5f 6f 66 5f |size%,number_of_| 00007720 77 6f 72 64 73 25 2c 6c 6f 6e 67 65 73 74 77 6f |words%,longestwo| 00007730 72 64 25 2c 66 69 74 71 75 61 6c 69 74 79 2c 70 |rd%,fitquality,p| 00007740 6f 73 73 69 62 6c 65 66 69 6c 6c 73 25 2c 61 63 |ossiblefills%,ac| 00007750 74 75 61 6c 66 69 6c 6c 73 2c 63 68 61 6e 67 65 |tualfills,change| 00007760 64 25 0d 2e c2 15 e3 20 78 25 20 3d 20 31 20 b8 |d%..... x% = 1 .| 00007770 20 78 73 69 7a 65 25 0d 2e cc 15 e3 20 79 25 20 | xsize%..... y% | 00007780 3d 20 31 20 b8 20 79 73 69 7a 65 25 0d 2e d6 17 |= 1 . ysize%....| 00007790 f1 23 66 69 6c 65 2c 67 72 69 64 24 28 78 25 2c |.#file,grid$(x%,| 000077a0 79 25 29 0d 2e e0 1a f1 23 66 69 6c 65 2c 6e 75 |y%).....#file,nu| 000077b0 6d 62 65 72 73 25 28 78 25 2c 79 25 29 0d 2e ea |mbers%(x%,y%)...| 000077c0 08 ed 20 79 25 0d 2e f4 08 ed 20 78 25 0d 2e fe |.. y%..... x%...| 000077d0 22 e3 20 77 6f 72 64 25 20 3d 20 31 20 b8 20 6e |". word% = 1 . n| 000077e0 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 64 73 25 0d |umber_of_words%.| 000077f0 2f 08 18 f1 23 66 69 6c 65 2c 77 6f 72 64 73 24 |/...#file,words$| 00007800 28 77 6f 72 64 25 29 0d 2f 12 19 f1 23 66 69 6c |(word%)./...#fil| 00007810 65 2c 77 6f 72 64 73 78 25 28 77 6f 72 64 25 29 |e,wordsx%(word%)| 00007820 0d 2f 1c 19 f1 23 66 69 6c 65 2c 77 6f 72 64 73 |./...#file,words| 00007830 79 25 28 77 6f 72 64 25 29 0d 2f 26 1c f1 23 66 |y%(word%)./&..#f| 00007840 69 6c 65 2c 77 6f 72 64 73 76 65 72 74 25 28 77 |ile,wordsvert%(w| 00007850 6f 72 64 25 29 0d 2f 30 1d f1 23 66 69 6c 65 2c |ord%)./0..#file,| 00007860 77 6f 72 64 73 68 6f 72 69 7a 25 28 77 6f 72 64 |wordshoriz%(word| 00007870 25 29 0d 2f 3a 0b ed 20 77 6f 72 64 25 0d 2f 44 |%)./:.. word%./D| 00007880 0a d9 23 66 69 6c 65 0d 2f 4e 16 24 6e 65 77 62 |..#file./N.$newb| 00007890 6c 6f 63 6b 25 20 3d 20 70 61 74 68 24 0d 2f 58 |lock% = path$./X| 000078a0 26 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 26 31 |&.. "OS_File",&1| 000078b0 32 2c 6e 65 77 62 6c 6f 63 6b 25 2c 6d 79 74 79 |2,newblock%,myty| 000078c0 70 65 25 0d 2f 62 22 f4 20 33 34 20 49 53 20 41 |pe%./b". 34 IS A| 000078d0 20 22 20 41 4e 44 20 26 31 32 20 49 53 20 53 45 | " AND &12 IS SE| 000078e0 54 54 59 50 45 0d 2f 6c 0e 73 61 76 65 64 25 20 |TTYPE./l.saved% | 000078f0 3d 20 b9 0d 2f 76 05 e1 0d 2f 80 04 0d 2f 8a 1f |= ../v.../.../..| 00007900 dd 20 a4 64 6f 65 73 66 69 6c 65 65 78 69 73 74 |. .doesfileexist| 00007910 28 66 69 6c 65 6e 61 6d 65 24 29 0d 2f 94 1c ea |(filename$)./...| 00007920 20 74 79 70 65 2c 6c 6f 61 64 2c 65 78 65 63 2c | type,load,exec,| 00007930 6c 65 6e 2c 61 74 74 0d 2f 9e 38 c8 99 20 22 4f |len,att./.8.. "O| 00007940 53 5f 46 69 6c 65 22 2c 26 30 35 2c 66 69 6c 65 |S_File",&05,file| 00007950 6e 61 6d 65 24 20 b8 20 74 79 70 65 2c 2c 6c 6f |name$ . type,,lo| 00007960 61 64 2c 65 78 65 63 2c 6c 65 6e 2c 61 74 74 0d |ad,exec,len,att.| 00007970 2f a8 10 e7 20 74 79 70 65 20 3d 20 30 20 8c 0d |/... type = 0 ..| 00007980 2f b2 06 3d a3 0d 2f bc 05 cc 0d 2f c6 06 3d b9 |/..=../..../..=.| 00007990 0d 2f d0 05 cd 0d 2f da 04 0d 2f e4 1a dd 20 f2 |./..../.../... .| 000079a0 6c 6f 61 64 67 72 69 64 28 66 69 6c 65 6e 61 6d |loadgrid(filenam| 000079b0 65 24 29 0d 2f ee 13 f4 20 4c 6f 61 64 20 6e 65 |e$)./... Load ne| 000079c0 77 20 67 72 69 64 0d 2f f8 21 ea 20 66 69 6c 65 |w grid./.!. file| 000079d0 2c 78 25 2c 79 25 2c 77 6f 72 64 25 2c 74 68 69 |,x%,y%,word%,thi| 000079e0 73 63 68 65 63 6b 24 0d 30 02 17 66 69 6c 65 20 |scheck$.0..file | 000079f0 3d 20 8e 28 66 69 6c 65 6e 61 6d 65 24 29 0d 30 |= .(filename$).0| 00007a00 0c 70 e8 23 66 69 6c 65 2c 74 68 69 73 63 68 65 |.p.#file,thische| 00007a10 63 6b 24 2c 78 73 69 7a 65 25 2c 79 73 69 7a 65 |ck$,xsize%,ysize| 00007a20 25 2c 6e 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 64 |%,number_of_word| 00007a30 73 25 2c 6c 6f 6e 67 65 73 74 77 6f 72 64 25 2c |s%,longestword%,| 00007a40 66 69 74 71 75 61 6c 69 74 79 2c 70 6f 73 73 69 |fitquality,possi| 00007a50 62 6c 65 66 69 6c 6c 73 25 2c 61 63 74 75 61 6c |blefills%,actual| 00007a60 66 69 6c 6c 73 2c 63 68 61 6e 67 65 64 25 0d 30 |fills,changed%.0| 00007a70 16 6d e7 20 74 68 69 73 63 68 65 63 6b 24 20 3c |.m. thischeck$ <| 00007a80 3e 20 63 68 65 63 6b 24 20 8c 20 f2 6f 6b 28 22 |> check$ . .ok("| 00007a90 54 68 69 73 20 66 69 6c 65 20 69 73 20 69 6e 63 |This file is inc| 00007aa0 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 74 |ompatible with t| 00007ab0 68 69 73 20 76 65 72 73 69 6f 6e 20 6f 66 20 74 |his version of t| 00007ac0 68 65 20 77 6f 72 64 73 65 61 72 63 68 20 63 72 |he wordsearch cr| 00007ad0 65 61 74 6f 72 22 29 20 3a 20 e1 0d 30 20 15 e3 |eator") : ..0 ..| 00007ae0 20 78 25 20 3d 20 31 20 b8 20 78 73 69 7a 65 25 | x% = 1 . xsize%| 00007af0 0d 30 2a 15 e3 20 79 25 20 3d 20 31 20 b8 20 79 |.0*.. y% = 1 . y| 00007b00 73 69 7a 65 25 0d 30 34 17 e8 23 66 69 6c 65 2c |size%.04..#file,| 00007b10 67 72 69 64 24 28 78 25 2c 79 25 29 0d 30 3e 1a |grid$(x%,y%).0>.| 00007b20 e8 23 66 69 6c 65 2c 6e 75 6d 62 65 72 73 25 28 |.#file,numbers%(| 00007b30 78 25 2c 79 25 29 0d 30 48 08 ed 20 79 25 0d 30 |x%,y%).0H.. y%.0| 00007b40 52 08 ed 20 78 25 0d 30 5c 22 e3 20 77 6f 72 64 |R.. x%.0\". word| 00007b50 25 20 3d 20 31 20 b8 20 6e 75 6d 62 65 72 5f 6f |% = 1 . number_o| 00007b60 66 5f 77 6f 72 64 73 25 0d 30 66 18 e8 23 66 69 |f_words%.0f..#fi| 00007b70 6c 65 2c 77 6f 72 64 73 24 28 77 6f 72 64 25 29 |le,words$(word%)| 00007b80 0d 30 70 19 e8 23 66 69 6c 65 2c 77 6f 72 64 73 |.0p..#file,words| 00007b90 78 25 28 77 6f 72 64 25 29 0d 30 7a 19 e8 23 66 |x%(word%).0z..#f| 00007ba0 69 6c 65 2c 77 6f 72 64 73 79 25 28 77 6f 72 64 |ile,wordsy%(word| 00007bb0 25 29 0d 30 84 1c e8 23 66 69 6c 65 2c 77 6f 72 |%).0...#file,wor| 00007bc0 64 73 76 65 72 74 25 28 77 6f 72 64 25 29 0d 30 |dsvert%(word%).0| 00007bd0 8e 1d e8 23 66 69 6c 65 2c 77 6f 72 64 73 68 6f |...#file,wordsho| 00007be0 72 69 7a 25 28 77 6f 72 64 25 29 0d 30 98 0b ed |riz%(word%).0...| 00007bf0 20 77 6f 72 64 25 0d 30 a2 0b d9 23 20 66 69 6c | word%.0...# fil| 00007c00 65 0d 30 ac 10 f2 75 70 64 61 74 65 77 6f 72 64 |e.0...updateword| 00007c10 73 0d 30 b6 12 f2 75 70 64 61 74 65 67 72 69 64 |s.0...updategrid| 00007c20 28 30 29 0d 30 c0 37 e7 20 63 68 61 6e 67 65 64 |(0).0.7. changed| 00007c30 25 20 3d 20 b9 20 8c 20 f2 75 70 64 61 74 65 71 |% = . . .updateq| 00007c40 75 61 6c 69 74 69 65 73 20 8b 20 f2 63 6c 65 61 |ualities . .clea| 00007c50 72 71 75 61 6c 69 74 69 65 73 0d 30 ca 14 67 72 |rqualities.0..gr| 00007c60 69 64 64 65 66 69 6e 65 64 25 20 3d 20 b9 0d 30 |iddefined% = ..0| 00007c70 d4 0e 73 61 76 65 64 25 20 3d 20 b9 0d 30 de 05 |..saved% = ..0..| 00007c80 e1 0d 30 e8 04 0d 30 f2 0d dd 20 f2 66 69 6e 69 |..0...0... .fini| 00007c90 73 68 0d 30 fc 22 f4 20 66 69 6c 6c 20 69 6e 20 |sh.0.". fill in | 00007ca0 65 6d 70 74 79 20 73 70 61 63 65 73 20 69 6e 20 |empty spaces in | 00007cb0 67 72 69 64 0d 31 06 53 ea 20 78 25 2c 79 25 2c |grid.1.S. x%,y%,| 00007cc0 68 6f 72 69 7a 25 2c 76 65 72 74 25 2c 74 68 69 |horiz%,vert%,thi| 00007cd0 73 6c 65 6e 67 74 68 25 2c 64 65 63 69 64 65 64 |slength%,decided| 00007ce0 78 25 2c 64 65 63 69 64 65 64 79 25 2c 64 65 63 |x%,decidedy%,dec| 00007cf0 69 64 65 64 76 65 72 74 25 2c 64 65 63 69 64 65 |idedvert%,decide| 00007d00 64 68 6f 72 69 7a 25 0d 31 10 17 e7 20 62 61 63 |dhoriz%.1... bac| 00007d10 6b 67 72 6f 75 6e 64 25 20 3d 20 b9 20 8c 0d 31 |kground% = . ..1| 00007d20 1a 16 f2 73 65 74 62 61 63 6b 67 72 6f 75 6e 64 |...setbackground| 00007d30 6d 61 73 6b 0d 31 24 2e f2 73 65 74 74 69 74 6c |mask.1$..settitl| 00007d40 65 62 61 72 28 66 69 74 74 69 6e 67 25 2c 22 46 |ebar(fitting%,"F| 00007d50 69 6c 6c 69 6e 67 20 69 6e 20 73 70 61 63 65 73 |illing in spaces| 00007d60 22 29 0d 31 2e 10 f2 6f 70 65 6e 66 69 74 74 69 |").1...openfitti| 00007d70 6e 67 0d 31 38 0f 62 75 74 25 20 3d 20 25 31 30 |ng.18.but% = %10| 00007d80 30 0d 31 42 05 cc 0d 31 4c 15 c8 99 20 22 48 6f |0.1B...1L... "Ho| 00007d90 75 72 67 6c 61 73 73 5f 4f 6e 22 0d 31 56 05 cd |urglass_On".1V..| 00007da0 0d 31 60 15 e3 20 78 25 20 3d 20 31 20 b8 20 78 |.1`.. x% = 1 . x| 00007db0 73 69 7a 65 25 0d 31 6a 15 e3 20 79 25 20 3d 20 |size%.1j.. y% = | 00007dc0 31 20 b8 20 79 73 69 7a 65 25 0d 31 74 4e e7 20 |1 . ysize%.1tN. | 00007dd0 62 61 63 6b 67 72 6f 75 6e 64 25 20 8c 20 e7 20 |background% . . | 00007de0 a4 61 63 74 69 6f 6e 28 66 69 74 74 69 6e 67 25 |.action(fitting%| 00007df0 29 20 3d 20 22 43 61 6e 63 65 6c 22 20 8c 20 f2 |) = "Cancel" . .| 00007e00 63 6c 6f 73 65 6f 6e 63 6c 69 63 6b 28 66 69 74 |closeonclick(fit| 00007e10 74 69 6e 67 25 29 3a e1 0d 31 7e 19 e7 20 67 72 |ting%):..1~.. gr| 00007e20 69 64 24 28 78 25 2c 79 25 29 20 3d 20 22 22 20 |id$(x%,y%) = "" | 00007e30 8c 0d 31 88 16 68 69 67 68 65 73 74 6c 65 6e 67 |..1..highestleng| 00007e40 74 68 25 20 3d 20 30 0d 31 92 1a e3 20 68 6f 72 |th% = 0.1... hor| 00007e50 69 7a 25 20 3d 20 31 20 b8 20 2d 31 20 88 20 2d |iz% = 1 . -1 . -| 00007e60 31 0d 31 9c 19 e3 20 76 65 72 74 25 20 3d 20 31 |1.1... vert% = 1| 00007e70 20 b8 20 2d 31 20 88 20 2d 31 0d 31 a6 5f e7 20 | . -1 . -1.1._. | 00007e80 62 61 63 6b 67 72 6f 75 6e 64 25 20 8c 20 e7 20 |background% . . | 00007e90 a4 61 63 74 69 6f 6e 28 66 69 74 74 69 6e 67 25 |.action(fitting%| 00007ea0 29 20 3d 20 22 43 61 6e 63 65 6c 22 20 8c 20 f2 |) = "Cancel" . .| 00007eb0 63 6c 6f 73 65 6f 6e 63 6c 69 63 6b 28 66 69 74 |closeonclick(fit| 00007ec0 74 69 6e 67 25 29 3a f2 75 70 64 61 74 65 71 75 |ting%):.updatequ| 00007ed0 61 6c 69 74 69 65 73 3a e1 0d 31 b0 22 e7 20 ac |alities:..1.". .| 00007ee0 28 20 68 6f 72 69 7a 25 20 3d 20 30 20 80 20 76 |( horiz% = 0 . v| 00007ef0 65 72 74 25 20 3d 20 30 29 20 8c 0d 31 ba 13 74 |ert% = 0) ..1..t| 00007f00 68 69 73 6c 65 6e 67 74 68 25 20 3d 20 31 0d 31 |hislength% = 1.1| 00007f10 c4 de c8 95 20 67 72 69 64 24 28 78 25 2b 28 68 |.... grid$(x%+(h| 00007f20 6f 72 69 7a 25 2a 74 68 69 73 6c 65 6e 67 74 68 |oriz%*thislength| 00007f30 25 29 2c 79 25 2b 28 76 65 72 74 25 2a 74 68 69 |%),y%+(vert%*thi| 00007f40 73 6c 65 6e 67 74 68 25 29 29 3d 22 22 20 80 20 |slength%))="" . | 00007f50 78 25 2b 28 68 6f 72 69 7a 25 2a 74 68 69 73 6c |x%+(horiz%*thisl| 00007f60 65 6e 67 74 68 25 29 20 3e 20 30 20 80 20 78 25 |ength%) > 0 . x%| 00007f70 2b 28 68 6f 72 69 7a 25 2a 74 68 69 73 6c 65 6e |+(horiz%*thislen| 00007f80 67 74 68 25 29 20 3c 3d 20 78 73 69 7a 65 25 20 |gth%) <= xsize% | 00007f90 80 20 79 25 2b 28 76 65 72 74 25 2a 74 68 69 73 |. y%+(vert%*this| 00007fa0 6c 65 6e 67 74 68 25 29 20 3e 20 30 20 80 20 79 |length%) > 0 . y| 00007fb0 25 2b 28 76 65 72 74 25 2a 74 68 69 73 6c 65 6e |%+(vert%*thislen| 00007fc0 67 74 68 25 29 20 3c 3d 20 79 73 69 7a 65 25 20 |gth%) <= ysize% | 00007fd0 80 20 74 68 69 73 6c 65 6e 67 74 68 25 20 3c 20 |. thislength% < | 00007fe0 6c 6f 6e 67 65 73 74 77 6f 72 64 25 0d 31 ce 24 |longestword%.1.$| 00007ff0 e7 20 74 68 69 73 6c 65 6e 67 74 68 25 20 3e 20 |. thislength% > | 00008000 68 69 67 68 65 73 74 6c 65 6e 67 74 68 25 20 8c |highestlength% .| 00008010 0d 31 d8 20 68 69 67 68 65 73 74 6c 65 6e 67 74 |.1. highestlengt| 00008020 68 25 20 3d 20 74 68 69 73 6c 65 6e 67 74 68 25 |h% = thislength%| 00008030 0d 31 e2 18 64 65 63 69 64 65 64 76 65 72 74 25 |.1..decidedvert%| 00008040 20 3d 20 76 65 72 74 25 0d 31 ec 1a 64 65 63 69 | = vert%.1..deci| 00008050 64 65 64 68 6f 72 69 7a 25 20 3d 20 68 6f 72 69 |dedhoriz% = hori| 00008060 7a 25 0d 31 f6 05 cd 0d 32 00 14 74 68 69 73 6c |z%.1....2..thisl| 00008070 65 6e 67 74 68 25 20 2b 3d 20 31 0d 32 0a 05 ce |ength% += 1.2...| 00008080 0d 32 14 05 cd 0d 32 1e 0b ed 20 76 65 72 74 25 |.2....2... vert%| 00008090 0d 32 28 0c ed 20 68 6f 72 69 7a 25 0d 32 32 30 |.2(.. horiz%.220| 000080a0 f4 20 54 72 79 20 61 6c 6c 20 64 69 72 65 63 74 |. Try all direct| 000080b0 69 6f 6e 73 20 66 72 6f 6d 20 73 61 6d 65 20 70 |ions from same p| 000080c0 6f 69 6e 74 20 74 68 65 6e 2e 2e 2e 0d 32 3c d1 |oint then....2<.| 000080d0 e7 20 77 6f 72 64 70 61 72 74 66 69 6c 6c 25 20 |. wordpartfill% | 000080e0 80 20 68 69 67 68 65 73 74 6c 65 6e 67 74 68 25 |. highestlength%| 000080f0 3e 31 20 80 20 6e 75 6d 62 65 72 5f 6f 66 5f 77 |>1 . number_of_w| 00008100 6f 72 64 73 25 20 3e 20 31 20 8c 20 f2 77 6f 72 |ords% > 1 . .wor| 00008110 64 70 61 72 74 66 69 6c 6c 28 78 25 2c 79 25 2c |dpartfill(x%,y%,| 00008120 64 65 63 69 64 65 64 76 65 72 74 25 2c 64 65 63 |decidedvert%,dec| 00008130 69 64 65 64 68 6f 72 69 7a 25 2c 68 69 67 68 65 |idedhoriz%,highe| 00008140 73 74 6c 65 6e 67 74 68 25 29 20 8b 20 e7 20 6c |stlength%) . . l| 00008150 65 74 74 65 72 66 69 6c 6c 25 20 80 20 6e 75 6d |etterfill% . num| 00008160 62 65 72 5f 6f 66 5f 77 6f 72 64 73 25 20 3e 20 |ber_of_words% > | 00008170 30 20 8c 20 f2 6c 65 74 74 65 72 66 69 6c 6c 28 |0 . .letterfill(| 00008180 78 25 2c 79 25 29 20 8b 20 f2 61 6e 79 6f 6c 64 |x%,y%) . .anyold| 00008190 6c 65 74 74 65 72 28 78 25 2c 79 25 29 0d 32 46 |letter(x%,y%).2F| 000081a0 05 cd 0d 32 50 08 ed 20 79 25 0d 32 5a 08 ed 20 |...2P.. y%.2Z.. | 000081b0 78 25 0d 32 64 17 e7 20 62 61 63 6b 67 72 6f 75 |x%.2d.. backgrou| 000081c0 6e 64 25 20 3d 20 b9 20 8c 0d 32 6e 1b f2 63 6c |nd% = . ..2n..cl| 000081d0 6f 73 65 6f 6e 63 6c 69 63 6b 28 66 69 74 74 69 |oseonclick(fitti| 000081e0 6e 67 25 29 0d 32 78 0e f2 72 65 73 65 74 6d 61 |ng%).2x..resetma| 000081f0 73 6b 0d 32 82 05 cc 0d 32 8c 16 c8 99 20 22 48 |sk.2....2.... "H| 00008200 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d 32 96 |ourglass_Off".2.| 00008210 05 cd 0d 32 a0 14 f2 75 70 64 61 74 65 71 75 61 |...2...updatequa| 00008220 6c 69 74 69 65 73 0d 32 aa 05 e1 0d 32 b4 04 0d |lities.2....2...| 00008230 32 be 2e dd f2 77 6f 72 64 70 61 72 74 66 69 6c |2....wordpartfil| 00008240 6c 28 78 25 2c 79 25 2c 76 65 72 74 25 2c 68 6f |l(x%,y%,vert%,ho| 00008250 72 69 7a 25 2c 6c 65 6e 67 74 68 25 29 0d 32 c8 |riz%,length%).2.| 00008260 43 f4 20 50 69 63 6b 20 73 65 63 74 69 6f 6e 20 |C. Pick section | 00008270 66 72 6f 6d 20 77 6f 72 64 20 61 6c 72 65 61 64 |from word alread| 00008280 79 20 75 73 65 64 20 66 6f 72 20 73 65 74 20 6f |y used for set o| 00008290 66 20 68 6f 6c 65 73 20 69 6e 20 67 72 69 64 2e |f holes in grid.| 000082a0 0d 32 d2 32 ea 20 72 61 6e 77 6f 72 64 25 2c 6c |.2.2. ranword%,l| 000082b0 65 74 74 65 72 25 2c 72 61 6e 6c 65 74 74 65 72 |etter%,ranletter| 000082c0 25 2c 70 6c 61 63 65 25 2c 66 69 6c 6c 74 79 70 |%,place%,filltyp| 000082d0 65 25 0d 32 dc 14 66 69 6c 6c 74 79 70 65 25 20 |e%.2..filltype% | 000082e0 3d 20 b3 28 32 29 0d 32 e6 05 f5 0d 32 f0 4a e7 |= .(2).2....2.J.| 000082f0 20 6e 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 64 73 | number_of_words| 00008300 25 20 3e 20 31 20 8c 20 72 61 6e 77 6f 72 64 25 |% > 1 . ranword%| 00008310 20 3d 20 b3 28 6e 75 6d 62 65 72 5f 6f 66 5f 77 | = .(number_of_w| 00008320 6f 72 64 73 25 29 20 8b 20 72 61 6e 77 6f 72 64 |ords%) . ranword| 00008330 25 20 3d 20 31 0d 32 fa 26 fd 20 a9 28 77 6f 72 |% = 1.2.&. .(wor| 00008340 64 73 24 28 72 61 6e 77 6f 72 64 25 29 29 2d 31 |ds$(ranword%))-1| 00008350 20 3e 3d 20 6c 65 6e 67 74 68 25 0d 33 04 27 72 | >= length%.3.'r| 00008360 61 6e 6c 65 74 74 65 72 25 20 3d 20 b3 28 a9 28 |anletter% = .(.(| 00008370 77 6f 72 64 73 24 28 72 61 6e 77 6f 72 64 25 29 |words$(ranword%)| 00008380 29 29 0d 33 0e 0e 70 6c 61 63 65 25 20 3d 20 30 |)).3..place% = 0| 00008390 0d 33 18 1b e3 20 6c 65 74 74 65 72 25 20 3d 20 |.3... letter% = | 000083a0 30 20 b8 20 6c 65 6e 67 74 68 25 0d 33 22 1d e7 |0 . length%.3"..| 000083b0 20 6c 65 74 74 65 72 25 20 3c 3e 20 72 61 6e 6c | letter% <> ranl| 000083c0 65 74 74 65 72 25 20 8c 0d 33 2c 12 c8 8e 20 66 |etter% ..3,... f| 000083d0 69 6c 6c 74 79 70 65 25 20 ca 0d 33 36 07 c9 20 |illtype% ..36.. | 000083e0 31 0d 33 40 4e 67 72 69 64 24 28 78 25 2b 28 68 |1.3@Ngrid$(x%+(h| 000083f0 6f 72 69 7a 25 2a 70 6c 61 63 65 25 29 2c 79 25 |oriz%*place%),y%| 00008400 2b 28 76 65 72 74 25 2a 70 6c 61 63 65 25 29 29 |+(vert%*place%))| 00008410 20 3d 20 c1 77 6f 72 64 73 24 28 72 61 6e 77 6f | = .words$(ranwo| 00008420 72 64 25 29 2c 6c 65 74 74 65 72 25 2c 31 29 0d |rd%),letter%,1).| 00008430 33 4a 07 c9 20 32 0d 33 54 6a 67 72 69 64 24 28 |3J.. 2.3Tjgrid$(| 00008440 78 25 2b 28 68 6f 72 69 7a 25 2a 70 6c 61 63 65 |x%+(horiz%*place| 00008450 25 29 2c 79 25 2b 28 76 65 72 74 25 2a 70 6c 61 |%),y%+(vert%*pla| 00008460 63 65 25 29 29 20 3d 20 c1 77 6f 72 64 73 24 28 |ce%)) = .words$(| 00008470 72 61 6e 77 6f 72 64 25 29 2c a9 28 77 6f 72 64 |ranword%),.(word| 00008480 73 24 28 72 61 6e 77 6f 72 64 25 29 29 2d 6c 65 |s$(ranword%))-le| 00008490 6e 67 74 68 25 2b 6c 65 74 74 65 72 25 2c 31 29 |ngth%+letter%,1)| 000084a0 0d 33 5e 05 cb 0d 33 68 0f 70 6c 61 63 65 25 20 |.3^...3h.place% | 000084b0 2b 3d 20 31 0d 33 72 05 cd 0d 33 7c 0d ed 20 6c |+= 1.3r...3|.. l| 000084c0 65 74 74 65 72 25 0d 33 86 1d 70 6f 73 73 69 62 |etter%.3..possib| 000084d0 6c 65 66 69 6c 6c 73 25 20 2b 3d 20 6c 65 6e 67 |lefills% += leng| 000084e0 74 68 25 0d 33 90 1a 61 63 74 75 61 6c 66 69 6c |th%.3..actualfil| 000084f0 6c 73 20 2b 3d 20 6c 65 6e 67 74 68 25 0d 33 9a |ls += length%.3.| 00008500 10 63 68 61 6e 67 65 64 25 20 3d 20 b9 0d 33 a4 |.changed% = ..3.| 00008510 0e 73 61 76 65 64 25 20 3d 20 a3 0d 33 ae 12 f2 |.saved% = ..3...| 00008520 75 70 64 61 74 65 67 72 69 64 28 30 29 0d 33 b8 |updategrid(0).3.| 00008530 05 e1 0d 33 c2 04 0d 33 cc 18 dd 20 f2 6c 65 74 |...3...3... .let| 00008540 74 65 72 66 69 6c 6c 28 78 25 2c 79 25 29 0d 33 |terfill(x%,y%).3| 00008550 d6 40 f4 20 50 69 63 6b 20 6c 65 74 74 65 72 20 |.@. Pick letter | 00008560 61 6c 72 65 61 64 79 20 75 73 65 64 20 69 6e 20 |already used in | 00008570 77 6f 72 64 20 66 6f 72 20 73 69 6e 67 6c 65 20 |word for single | 00008580 73 70 61 63 65 20 69 6e 20 67 72 69 64 2e 0d 33 |space in grid..3| 00008590 e0 1f ea 20 63 68 6f 73 65 6e 77 6f 72 64 24 2c |... chosenword$,| 000085a0 63 68 6f 73 65 6e 6c 65 74 74 65 72 24 0d 33 ea |chosenletter$.3.| 000085b0 60 e7 20 6e 75 6d 62 65 72 5f 6f 66 5f 77 6f 72 |`. number_of_wor| 000085c0 64 73 25 20 3d 20 31 20 8c 20 63 68 6f 73 65 6e |ds% = 1 . chosen| 000085d0 77 6f 72 64 24 20 3d 20 77 6f 72 64 73 24 28 31 |word$ = words$(1| 000085e0 29 20 8b 20 63 68 6f 73 65 6e 77 6f 72 64 24 20 |) . chosenword$ | 000085f0 3d 20 77 6f 72 64 73 24 28 b3 28 6e 75 6d 62 65 |= words$(.(numbe| 00008600 72 5f 6f 66 5f 77 6f 72 64 73 25 29 29 0d 33 f4 |r_of_words%)).3.| 00008610 38 63 68 6f 73 65 6e 6c 65 74 74 65 72 24 20 3d |8chosenletter$ =| 00008620 20 c1 63 68 6f 73 65 6e 77 6f 72 64 24 2c a8 28 | .chosenword$,.(| 00008630 b3 28 a9 28 63 68 6f 73 65 6e 77 6f 72 64 24 29 |.(.(chosenword$)| 00008640 29 29 2c 31 29 0d 33 fe 20 67 72 69 64 24 28 78 |)),1).3. grid$(x| 00008650 25 2c 79 25 29 20 3d 20 63 68 6f 73 65 6e 6c 65 |%,y%) = chosenle| 00008660 74 74 65 72 24 0d 34 08 17 70 6f 73 73 69 62 6c |tter$.4..possibl| 00008670 65 66 69 6c 6c 73 25 20 2b 3d 20 31 0d 34 12 16 |efills% += 1.4..| 00008680 61 63 74 75 61 6c 66 69 6c 6c 73 20 2b 3d 20 30 |actualfills += 0| 00008690 2e 35 0d 34 1c 10 63 68 61 6e 67 65 64 25 20 3d |.5.4..changed% =| 000086a0 20 b9 0d 34 26 0e 73 61 76 65 64 25 20 3d 20 a3 | ..4&.saved% = .| 000086b0 0d 34 30 13 f2 75 70 64 61 74 65 67 72 69 64 28 |.40..updategrid(| 000086c0 79 25 29 0d 34 3a 05 e1 0d 34 44 04 0d 34 4e 1a |y%).4:...4D..4N.| 000086d0 dd 20 f2 61 6e 79 6f 6c 64 6c 65 74 74 65 72 28 |. .anyoldletter(| 000086e0 78 25 2c 79 25 29 0d 34 58 26 f4 20 50 69 63 6b |x%,y%).4X&. Pick| 000086f0 20 61 6e 79 20 6c 65 74 74 65 72 20 66 6f 72 20 | any letter for | 00008700 73 69 6e 67 6c 65 20 73 70 61 63 65 0d 34 62 10 |single space.4b.| 00008710 ea 20 63 68 61 72 61 63 74 65 72 24 0d 34 6c 1c |. character$.4l.| 00008720 63 68 61 72 61 63 74 65 72 24 20 3d 20 bd 28 b3 |character$ = .(.| 00008730 28 32 34 29 2b 36 35 29 0d 34 76 1d 67 72 69 64 |(24)+65).4v.grid| 00008740 24 28 78 25 2c 79 25 29 20 3d 20 63 68 61 72 61 |$(x%,y%) = chara| 00008750 63 74 65 72 24 0d 34 80 10 63 68 61 6e 67 65 64 |cter$.4..changed| 00008760 25 20 3d 20 b9 0d 34 8a 0e 73 61 76 65 64 25 20 |% = ..4..saved% | 00008770 3d 20 a3 0d 34 94 17 70 6f 73 73 69 62 6c 65 66 |= ..4..possiblef| 00008780 69 6c 6c 73 25 20 2b 3d 20 31 0d 34 9e 13 f2 75 |ills% += 1.4...u| 00008790 70 64 61 74 65 67 72 69 64 28 79 25 29 0d 34 a8 |pdategrid(y%).4.| 000087a0 05 e1 0d 34 b2 04 0d 34 bc 10 dd 20 f2 63 6c 65 |...4...4... .cle| 000087b0 61 72 67 72 69 64 0d 34 c6 28 f4 20 43 6c 65 61 |argrid.4.(. Clea| 000087c0 72 20 61 6c 6c 20 69 63 6f 6e 73 20 69 6e 20 74 |r all icons in t| 000087d0 68 65 20 67 72 69 64 20 77 69 6e 64 6f 77 0d 34 |he grid window.4| 000087e0 d0 08 ea 20 79 25 0d 34 da 1b e3 20 79 25 20 3d |... y%.4... y% =| 000087f0 20 31 20 b8 20 6d 61 78 67 72 69 64 73 69 7a 65 | 1 . maxgridsize| 00008800 25 0d 34 e4 1e f2 73 65 74 5f 76 65 72 73 69 6f |%.4...set_versio| 00008810 6e 28 67 72 69 64 25 2c 79 25 2c 22 20 22 29 0d |n(grid%,y%," ").| 00008820 34 ee 08 ed 20 79 25 0d 34 f8 05 e1 0d 35 02 04 |4... y%.4....5..| 00008830 0d 35 0c 18 dd 20 f2 75 70 64 61 74 65 67 72 69 |.5... .updategri| 00008840 64 28 6c 69 6e 65 25 29 0d 35 16 12 f4 20 64 69 |d(line%).5... di| 00008850 73 70 6c 61 79 20 67 72 69 64 0d 35 20 11 e7 20 |splay grid.5 .. | 00008860 6c 69 6e 65 25 20 3d 20 30 20 8c 0d 35 2a 08 ea |line% = 0 ..5*..| 00008870 20 79 25 0d 35 34 15 e3 20 79 25 20 3d 20 31 20 | y%.54.. y% = 1 | 00008880 b8 20 79 73 69 7a 65 25 0d 35 3e 47 f2 73 65 74 |. ysize%.5>G.set| 00008890 5f 76 65 72 73 69 6f 6e 28 67 72 69 64 25 2c a8 |_version(grid%,.| 000088a0 28 28 6d 61 78 67 72 69 64 73 69 7a 65 25 2d 79 |((maxgridsize%-y| 000088b0 73 69 7a 65 25 29 2f 32 29 2b 79 25 2c a4 67 72 |size%)/2)+y%,.gr| 000088c0 69 64 74 6f 73 74 72 69 6e 67 28 79 25 29 29 0d |idtostring(y%)).| 000088d0 35 48 08 ed 20 79 25 0d 35 52 05 cc 0d 35 5c 4d |5H.. y%.5R...5\M| 000088e0 f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 67 72 69 |.set_version(gri| 000088f0 64 25 2c a8 28 28 6d 61 78 67 72 69 64 73 69 7a |d%,.((maxgridsiz| 00008900 65 25 2d 79 73 69 7a 65 25 29 2f 32 29 2b 6c 69 |e%-ysize%)/2)+li| 00008910 6e 65 25 2c a4 67 72 69 64 74 6f 73 74 72 69 6e |ne%,.gridtostrin| 00008920 67 28 6c 69 6e 65 25 29 29 0d 35 66 05 cd 0d 35 |g(line%)).5f...5| 00008930 70 05 e1 0d 35 7a 04 0d 35 84 12 dd 20 a4 77 6f |p...5z..5... .wo| 00008940 72 64 71 75 61 6c 69 74 79 0d 35 8e 23 3d a4 66 |rdquality.5.#=.f| 00008950 69 78 28 32 2c 66 69 74 71 75 61 6c 69 74 79 2f |ix(2,fitquality/| 00008960 c6 8e a9 77 6f 72 64 73 24 28 29 29 0d 35 98 04 |...words$()).5..| 00008970 0d 35 a2 12 dd 20 a4 66 69 6c 6c 71 75 61 6c 69 |.5... .fillquali| 00008980 74 79 0d 35 ac 28 3d a8 28 28 61 63 74 75 61 6c |ty.5.(=.((actual| 00008990 66 69 6c 6c 73 2f 70 6f 73 73 69 62 6c 65 66 69 |fills/possiblefi| 000089a0 6c 6c 73 25 29 2a 31 30 30 29 0d 35 b6 04 0d 35 |lls%)*100).5...5| 000089b0 c0 18 dd 20 a4 77 6f 72 64 71 75 61 6c 69 74 79 |... .wordquality| 000089c0 73 74 72 69 6e 67 0d 35 ca 1c e7 20 6e 75 6d 62 |string.5... numb| 000089d0 65 72 5f 6f 66 5f 77 6f 72 64 73 25 20 3e 20 30 |er_of_words% > 0| 000089e0 20 8c 0d 35 d4 18 3d c0 c3 28 a4 77 6f 72 64 71 | ..5..=..(.wordq| 000089f0 75 61 6c 69 74 79 29 2c 34 29 0d 35 de 05 cc 0d |uality),4).5....| 00008a00 35 e8 07 3d 22 22 0d 35 f2 05 cd 0d 35 fc 04 0d |5..="".5....5...| 00008a10 36 06 18 dd 20 a4 66 69 6c 6c 71 75 61 6c 69 74 |6... .fillqualit| 00008a20 79 73 74 72 69 6e 67 0d 36 10 1a e7 20 70 6f 73 |ystring.6... pos| 00008a30 73 69 62 6c 65 66 69 6c 6c 73 25 20 3e 20 30 20 |siblefills% > 0 | 00008a40 8c 0d 36 1a 14 3d c3 28 a4 66 69 6c 6c 71 75 61 |..6..=.(.fillqua| 00008a50 6c 69 74 79 29 0d 36 24 05 cc 0d 36 2e 07 3d 22 |lity).6$...6..="| 00008a60 22 0d 36 38 05 cd 0d 36 42 04 0d 36 4c 12 dd 20 |".68...6B..6L.. | 00008a70 f2 75 70 64 61 74 65 77 6f 72 64 73 0d 36 56 1a |.updatewords.6V.| 00008a80 f4 20 75 70 64 61 74 65 20 6c 69 73 74 20 6f 66 |. update list of| 00008a90 20 77 6f 72 64 73 0d 36 60 0b ea 20 77 6f 72 64 | words.6`.. word| 00008aa0 25 0d 36 6a 1b e3 20 77 6f 72 64 25 20 3d 20 31 |%.6j.. word% = 1| 00008ab0 20 b8 20 6d 61 78 77 6f 72 64 73 25 0d 36 74 2e | . maxwords%.6t.| 00008ac0 f2 73 65 74 5f 76 65 72 73 69 6f 6e 28 77 6f 72 |.set_version(wor| 00008ad0 64 73 25 2c 77 6f 72 64 25 2d 31 2c 77 6f 72 64 |ds%,word%-1,word| 00008ae0 73 24 28 77 6f 72 64 25 29 29 0d 36 7e 0b ed 20 |s$(word%)).6~.. | 00008af0 77 6f 72 64 25 0d 36 88 05 e1 0d 36 92 04 0d 36 |word%.6....6...6| 00008b00 9c 0b dd 20 a4 64 69 63 74 0d 36 a6 1f f4 20 50 |... .dict.6... P| 00008b10 69 63 6b 20 77 6f 72 64 20 66 72 6f 6d 20 64 69 |ick word from di| 00008b20 63 74 69 6f 6e 61 72 79 0d 36 b0 13 ea 20 6c 65 |ctionary.6... le| 00008b30 74 74 65 72 24 2c 77 6f 72 64 24 0d 36 ba 05 f5 |tter$,word$.6...| 00008b40 0d 36 c4 29 cf 23 64 69 63 74 69 6f 6e 61 72 79 |.6.).#dictionary| 00008b50 20 3d 20 b3 28 28 a2 23 64 69 63 74 69 6f 6e 61 | = .((.#dictiona| 00008b60 72 79 20 29 2b 31 29 2d 31 0d 36 ce 05 f5 0d 36 |ry )+1)-1.6....6| 00008b70 d8 21 cf 23 64 69 63 74 69 6f 6e 61 72 79 20 3d |.!.#dictionary =| 00008b80 20 8f 23 64 69 63 74 69 6f 6e 61 72 79 2d 32 0d | .#dictionary-2.| 00008b90 36 e2 29 fd 20 bd 28 9a 23 64 69 63 74 69 6f 6e |6.). .(.#diction| 00008ba0 61 72 79 29 20 3d 20 bd 28 31 30 29 20 3a 20 f4 |ary) = .(10) : .| 00008bb0 20 4e 65 77 6c 69 6e 65 0d 36 ec 05 f5 0d 36 f6 | Newline.6....6.| 00008bc0 1d 6c 65 74 74 65 72 24 20 3d 20 bd 28 9a 23 64 |.letter$ = .(.#d| 00008bd0 69 63 74 69 6f 6e 61 72 79 29 0d 37 00 14 77 6f |ictionary).7..wo| 00008be0 72 64 24 20 2b 3d 20 6c 65 74 74 65 72 24 0d 37 |rd$ += letter$.7| 00008bf0 0a 15 fd 20 6c 65 74 74 65 72 24 20 3d 20 bd 28 |... letter$ = .(| 00008c00 31 30 29 0d 37 14 20 77 6f 72 64 24 20 3d 20 c1 |10).7. word$ = .| 00008c10 77 6f 72 64 24 2c 31 2c a9 28 77 6f 72 64 24 29 |word$,1,.(word$)| 00008c20 2d 31 29 0d 37 1e 1e fd 20 a9 28 77 6f 72 64 24 |-1).7... .(word$| 00008c30 29 20 3c 3d 20 6d 61 78 67 72 69 64 73 69 7a 65 |) <= maxgridsize| 00008c40 25 0d 37 28 0a 3d 77 6f 72 64 24 0d 37 32 04 0d |%.7(.=word$.72..| 00008c50 37 3c 11 dd 20 a4 6d 61 78 28 61 25 2c 62 25 29 |7<.. .max(a%,b%)| 00008c60 0d 37 46 17 e7 20 61 25 3e 62 25 20 8c 20 3d 61 |.7F.. a%>b% . =a| 00008c70 25 20 8b 20 3d 62 25 0d 37 50 04 0d 37 5a 13 dd |% . =b%.7P..7Z..| 00008c80 20 a4 66 69 78 28 64 70 25 2c 6e 75 6d 29 0d 37 | .fix(dp%,num).7| 00008c90 64 1d 3d a8 28 6e 75 6d 2a 28 31 30 5e 64 70 25 |d.=.(num*(10^dp%| 00008ca0 29 29 2f 28 31 30 5e 64 70 25 29 0d 37 6e 04 0d |))/(10^dp%).7n..| 00008cb0 37 78 18 dd 20 a4 75 70 70 65 72 5f 63 61 73 65 |7x.. .upper_case| 00008cc0 28 77 6f 72 64 24 29 0d 37 82 20 f4 20 70 75 74 |(word$).7. . put| 00008cd0 73 20 77 6f 72 64 24 20 69 6e 74 6f 20 75 70 70 |s word$ into upp| 00008ce0 65 72 20 63 61 73 65 0d 37 8c 18 ea 20 63 6f 6e |er case.7... con| 00008cf0 76 65 72 74 65 64 24 2c 6c 65 74 74 65 72 25 0d |verted$,letter%.| 00008d00 37 96 1c e3 20 6c 65 74 74 65 72 25 20 3d 20 31 |7... letter% = 1| 00008d10 20 b8 20 a9 28 77 6f 72 64 24 29 0d 37 a0 21 e7 | . .(word$).7.!.| 00008d20 20 97 28 c1 77 6f 72 64 24 2c 6c 65 74 74 65 72 | .(.word$,letter| 00008d30 25 2c 31 29 29 20 3e 20 39 36 20 8c 0d 37 aa 2c |%,1)) > 96 ..7.,| 00008d40 63 6f 6e 76 65 72 74 65 64 24 20 2b 3d 20 bd 28 |converted$ += .(| 00008d50 97 28 c1 77 6f 72 64 24 2c 6c 65 74 74 65 72 25 |.(.word$,letter%| 00008d60 2c 31 29 29 2d 33 32 29 0d 37 b4 05 cc 0d 37 be |,1))-32).7....7.| 00008d70 23 63 6f 6e 76 65 72 74 65 64 24 20 2b 3d 20 c1 |#converted$ += .| 00008d80 77 6f 72 64 24 2c 6c 65 74 74 65 72 25 2c 31 29 |word$,letter%,1)| 00008d90 0d 37 c8 05 cd 0d 37 d2 0d ed 20 6c 65 74 74 65 |.7....7... lette| 00008da0 72 25 0d 37 dc 0f 3d 63 6f 6e 76 65 72 74 65 64 |r%.7..=converted| 00008db0 24 0d 37 e6 04 0d 37 f0 20 dd 20 a4 73 74 72 69 |$.7...7. . .stri| 00008dc0 70 6c 65 61 64 69 6e 67 73 70 61 63 65 73 28 77 |pleadingspaces(w| 00008dd0 6f 72 64 24 29 0d 37 fa 16 c8 95 20 c0 77 6f 72 |ord$).7.... .wor| 00008de0 64 24 2c 31 29 20 3d 20 22 20 22 0d 38 04 15 77 |d$,1) = " ".8..w| 00008df0 6f 72 64 24 20 3d 20 c1 77 6f 72 64 24 2c 32 29 |ord$ = .word$,2)| 00008e00 0d 38 0e 05 ce 0d 38 18 16 c8 95 20 c2 77 6f 72 |.8....8.... .wor| 00008e10 64 24 2c 31 29 20 3d 20 22 20 22 0d 38 22 20 77 |d$,1) = " ".8" w| 00008e20 6f 72 64 24 20 3d 20 c1 77 6f 72 64 24 2c 31 2c |ord$ = .word$,1,| 00008e30 a9 28 77 6f 72 64 24 29 2d 31 29 0d 38 2c 05 ce |.(word$)-1).8,..| 00008e40 0d 38 36 0a 3d 77 6f 72 64 24 0d 38 40 04 0d 38 |.86.=word$.8@..8| 00008e50 4a 0b dd 20 f2 69 6e 69 74 0d 38 54 08 ea 20 69 |J.. .init.8T.. i| 00008e60 25 0d 38 5e 17 63 68 65 63 6b 24 20 3d 20 22 40 |%.8^.check$ = "@| 00008e70 2a 26 5e 21 23 a4 a3 22 0d 38 68 5c f4 20 66 6f |*&^!#..".8h\. fo| 00008e80 6c 6c 6f 77 69 6e 67 20 6c 69 6e 65 20 73 65 74 |llowing line set| 00008e90 73 20 6d 61 78 69 6d 75 6d 20 73 69 7a 65 20 6f |s maximum size o| 00008ea0 66 20 67 72 69 64 73 2e 20 43 61 6e 20 62 65 20 |f grids. Can be | 00008eb0 63 68 61 6e 67 65 64 20 74 6f 20 61 6e 79 74 68 |changed to anyth| 00008ec0 69 6e 67 20 28 77 69 74 68 69 6e 20 72 65 61 73 |ing (within reas| 00008ed0 6f 6e 29 2e 0d 38 72 13 6d 61 78 67 72 69 64 73 |on)..8r.maxgrids| 00008ee0 69 7a 65 25 3d 32 30 0d 38 7c 49 f4 20 66 6f 6c |ize%=20.8|I. fol| 00008ef0 6c 6f 77 69 6e 67 20 6c 69 6e 65 20 73 65 74 73 |lowing line sets| 00008f00 20 6d 61 78 69 6d 75 6d 20 6e 75 6d 62 65 72 20 | maximum number | 00008f10 6f 66 20 77 6f 72 64 73 2e 20 41 67 61 69 6e 2c |of words. Again,| 00008f20 20 63 61 6e 20 62 65 20 63 68 61 6e 67 65 64 2e | can be changed.| 00008f30 0d 38 86 31 f4 20 4d 55 53 54 20 42 45 20 44 49 |.8.1. MUST BE DI| 00008f40 56 49 53 41 42 4c 45 20 42 45 20 33 20 28 46 4f |VISABLE BE 3 (FO| 00008f50 52 20 50 52 49 4e 54 20 52 4f 55 4e 54 49 4e 45 |R PRINT ROUNTINE| 00008f60 29 0d 38 90 10 6d 61 78 77 6f 72 64 73 25 3d 36 |).8..maxwords%=6| 00008f70 30 0d 38 9a 0b 71 75 69 74 25 3d 30 0d 38 a4 10 |0.8..quit%=0.8..| 00008f80 f2 6c 6f 61 64 6f 70 74 69 6f 6e 73 0d 38 ae bd |.loadoptions.8..| 00008f90 de 20 67 72 69 64 24 28 6d 61 78 67 72 69 64 73 |. grid$(maxgrids| 00008fa0 69 7a 65 25 2b 31 2c 6d 61 78 67 72 69 64 73 69 |ize%+1,maxgridsi| 00008fb0 7a 65 25 2b 31 29 2c 20 6e 75 6d 62 65 72 73 25 |ze%+1), numbers%| 00008fc0 28 6d 61 78 67 72 69 64 73 69 7a 65 25 2b 31 2c |(maxgridsize%+1,| 00008fd0 6d 61 78 67 72 69 64 73 69 7a 65 25 2b 31 29 2c |maxgridsize%+1),| 00008fe0 20 77 6f 72 64 73 24 28 6d 61 78 77 6f 72 64 73 | words$(maxwords| 00008ff0 25 29 2c 20 77 6f 72 64 73 78 25 28 6d 61 78 77 |%), wordsx%(maxw| 00009000 6f 72 64 73 25 29 2c 20 77 6f 72 64 73 79 25 28 |ords%), wordsy%(| 00009010 6d 61 78 77 6f 72 64 73 25 29 2c 20 77 6f 72 64 |maxwords%), word| 00009020 73 76 65 72 74 25 28 6d 61 78 77 6f 72 64 73 25 |svert%(maxwords%| 00009030 29 2c 20 77 6f 72 64 73 68 6f 72 69 7a 25 28 6d |), wordshoriz%(m| 00009040 61 78 77 6f 72 64 73 25 29 0d 38 b8 39 f4 20 47 |axwords%).8.9. G| 00009050 6f 64 20 49 20 77 69 73 68 20 74 68 69 73 20 77 |od I wish this w| 00009060 61 73 20 43 20 72 69 67 68 74 20 6e 6f 77 2e 2e |as C right now..| 00009070 2e 74 79 70 65 64 65 66 20 73 74 72 75 63 74 2e |.typedef struct.| 00009080 2e 2e 0d 38 c2 25 74 65 6d 70 77 6f 72 64 70 61 |...8.%tempwordpa| 00009090 72 74 66 69 6c 6c 25 20 3d 20 77 6f 72 64 70 61 |rtfill% = wordpa| 000090a0 72 74 66 69 6c 6c 25 0d 38 cc 21 74 65 6d 70 6c |rtfill%.8.!templ| 000090b0 65 74 74 65 72 66 69 6c 6c 25 20 3d 20 6c 65 74 |etterfill% = let| 000090c0 74 65 72 66 69 6c 6c 25 0d 38 d6 15 74 65 6d 70 |terfill%.8..temp| 000090d0 62 69 61 73 25 20 3d 20 62 69 61 73 25 0d 38 e0 |bias% = bias%.8.| 000090e0 14 67 72 69 64 64 65 66 69 6e 65 64 25 20 3d 20 |.griddefined% = | 000090f0 a3 0d 38 ea 10 63 68 61 6e 67 65 64 25 20 3d 20 |..8..changed% = | 00009100 a3 0d 38 f4 0e 73 61 76 65 64 25 20 3d 20 b9 0d |..8..saved% = ..| 00009110 38 fe 05 e1 0d 39 08 04 0d 39 12 16 dd 20 a4 66 |8....9...9... .f| 00009120 69 6e 64 6e 61 6d 65 28 61 64 64 72 25 29 0d 39 |indname(addr%).9| 00009130 1c 0d ea 20 72 65 73 75 6c 74 24 0d 39 26 12 c8 |... result$.9&..| 00009140 95 20 3f 61 64 64 72 25 20 3e 20 33 31 0d 39 30 |. ?addr% > 31.90| 00009150 18 72 65 73 75 6c 74 24 20 2b 3d 20 bd 28 3f 61 |.result$ += .(?a| 00009160 64 64 72 25 29 0d 39 3a 0e 61 64 64 72 25 20 2b |ddr%).9:.addr% +| 00009170 3d 20 31 0d 39 44 05 ce 0d 39 4e 0c 3d 72 65 73 |= 1.9D...9N.=res| 00009180 75 6c 74 24 0d 39 58 04 0d 39 62 12 dd 20 a4 69 |ult$.9X..9b.. .i| 00009190 73 70 72 69 6e 74 65 72 6f 6e 0d 39 6c 10 ea 20 |sprinteron.9l.. | 000091a0 70 72 69 6e 74 65 72 6f 6e 25 0d 39 76 12 70 72 |printeron%.9v.pr| 000091b0 69 6e 74 65 72 6f 6e 25 20 3d 20 b9 0d 39 80 10 |interon% = ..9..| 000091c0 62 65 66 25 20 3d 20 96 28 2d 34 29 0d 39 8a 28 |bef% = .(-4).9.(| 000091d0 ef 32 2c 31 2c 30 2c 31 2c 30 2c 31 2c 30 2c 31 |.2,1,0,1,0,1,0,1| 000091e0 2c 30 2c 31 2c 30 2c 31 2c 30 2c 31 2c 30 2c 31 |,0,1,0,1,0,1,0,1| 000091f0 2c 30 2c 33 0d 39 94 09 d1 20 3d 20 30 0d 39 9e |,0,3.9... = 0.9.| 00009200 0f f5 20 fd 20 91 20 3e 20 31 30 30 0d 39 a8 10 |.. . . > 100.9..| 00009210 61 66 74 25 20 3d 20 96 28 2d 34 29 0d 39 b2 23 |aft% = .(-4).9.#| 00009220 e7 20 62 65 66 25 20 3c 3e 20 61 66 74 25 20 8c |. bef% <> aft% .| 00009230 20 70 72 69 6e 74 65 72 6f 6e 25 20 3d 20 a3 0d | printeron% = ..| 00009240 39 bc 0f 3d 70 72 69 6e 74 65 72 6f 6e 25 0d 39 |9..=printeron%.9| 00009250 c6 04 0d ff |....| 00009254