Home » Archimedes archive » Acorn User » AU 1996-Xmas.adf » Regulars » StarInfo/Wickett/!LookOut/!RunImage
StarInfo/Wickett/!LookOut/!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 » Acorn User » AU 1996-Xmas.adf » Regulars |
Filename: | StarInfo/Wickett/!LookOut/!RunImage |
Read OK: | ✔ |
File size: | 2AB4 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM > <LookOut$Dir>.!RunImage 20REM Written by Barry Wickett, April 96 30REM 40REM Queries to: 50REM Barry Wickett 60REM 14 New Zealand Road 70REM Cardiff 80REM CF4 3BR 90 100IF INKEY(-3) THEN alt%=TRUE ELSE alt%=FALSE 110REM check to see if an ALT key is depressed 120 130my_dir$="<LookOut$Dir>" 140 150PROCmessage_load(my_dir$+".Messages") 160 170my_name$=FNmessage("PGN") 180 190DIM message_block% 12 200!message_block%=&502 210message_block%!4=&400C2 220message_block%!8=0 230REM Tell the Wimp only to bother me with these 3 messages. 240 250SYS"Wimp_Initialise",310,&4B534154,my_name$,message_block% TO ,my_task% 260 270ON ERROR PROCreport_error(REPORT$+" at line "+STR$(ERL)):END 280 290indsize%=3000 300DIM q% 1200, ind% indsize%, menu_block% 1000 310indend%=ind%+indsize% 320REM set up general block, indirected icon block and menu block 330 340SYS"Wimp_OpenTemplate",,my_dir$+".Templates" 350IF alt% THEN 360 main%=FNload_template("setup") 370 info%=0 380ELSE 390 info%=FNload_template("info") 400 main%=0 410ENDIF 420SYS"Wimp_CloseTemplate" 430 440PROCinit_setup 450 460IF show_icon% AND alt%=FALSE THEN PROCinit_icon_bar 470 480IF alt% THEN PROCinit_alt ELSE PROCcheck_all_tasks 490 500exit%=FALSE 510 520REPEAT 530 SYS"Wimp_Poll",1,q% TO reason% 540 CASE reason% OF 550 WHEN 2 : PROCwindow_open(q%) 560 WHEN 6 : PROCmouse_click(!q%,q%!4,q%!8,q%!12,q%!16) 570 WHEN 8 : PROCkey_pressed(!q%,q%!4,q%!24) 580 WHEN 9 : PROCmenu_select 590 WHEN 17,18 : PROCmessage(q%!16) 600 ENDCASE 610UNTIL exit% 620 630IF alt% THEN SYS"Wimp_Poll",0,q% : REM fudge for highlighted icons 640 650PROCmessage_close 660 670SYS"Wimp_CloseDown" 680 690REM Bye! 700 710END 720 730DEF PROCmouse_click(mx%,my%,but%,wind%,icon%) 740CASE wind% OF 750 760 WHEN -2 : IF but%=2 THEN PROCopen_menu(bar_menu%,mx%-(bar_menu%!16)/2-16,184) 770 REM If menu button has been pressed over icon bar then open menu 780 790 WHEN main% 800 IF but%=4 THEN 810 CASE icon% OF 820 WHEN 9,10 830 REM Icons to change task number 840 new%=last%+(icon%-9)*2-1 850 IF new%<1 THEN new%=max_tasks% 860 IF new%>max_tasks% THEN new%=1 870 REM Make sure the new task number is in range 880 PROCset(new%) 890 900 WHEN 13 : PROCopen_task_menu 910 REM Task menu icon 920 930 WHEN 17 : exit%=TRUE 940 REM Cancel icon 950 960 WHEN 18 970 PROCget 980 PROCsave_setup 990 exit%=TRUE 1000 REM Save icon 1010 1020 ENDCASE 1030 ENDIF 1040ENDCASE 1050ENDPROC 1060 1070DEF PROCkey_pressed(wind%,icon%,key%) 1080SYS"Wimp_ProcessKey",key% 1090REM Pass on all keys passed to Look Out 1100ENDPROC 1110 1120DEF PROCmenu_select 1130IF alt% THEN 1140 REM Check which menu I am dealing with 1150 IF !q%>=0 THEN 1160 PROCicon_set_text(main%,11,FNstring(!(menu_block%+40+!q%*24))) 1170 REM Set new task name from menu block 1180 1190 PROCcaret_reset(main%) 1200 REM Make sure the caret is now in a sensible place 1210 ENDIF 1220ELSE 1230 IF !q%=1 THEN exit%=TRUE 1240 REM Quit option on icon bar menu 1250ENDIF 1260ENDPROC 1270 1280DEF PROCmessage(type%) 1290CASE type% OF 1300 WHEN 0 : IF allow_quit% THEN exit%=TRUE 1310 REM It was nice knowing you 1320 1330 WHEN &502 : PROCdo_help 1340 REM 'Cos I'm a nice helpful chap! 1350 1360 WHEN &400C2 : IF alt%=FALSE THEN PROCcheck_task(FNstring(q%+28),q%!4) 1370 REM Check if new task is listed 1380ENDCASE 1390ENDPROC 1400 1410DEF PROCinit_setup 1420max_tasks%=16 1430DIM task$(max_tasks%),quit%(max_tasks%),message%(max_tasks%),message$(max_tasks%) 1440PROCload_setup 1450ENDPROC 1460 1470DEF PROCinit_icon_bar 1480my_icon%=FNicon_create(-2,0,0,68,68,&2002,"!lookout") 1490 1500bar_menu%=FNstart_menu(my_name$) 1510PROCmenu_item(FNmessage("MI0:"),info%) 1520PROCmenu_item(FNmessage("MI1:"),0) 1530PROCend_menu 1540REM Create icon bar icon if set up allows it and not in alt mode 1550 1560PROCmenu_shade(bar_menu%,1,(allow_quit%=FALSE)) 1570REM Shade out quit option if disallowed 1580ENDPROC 1590 1600DEF PROCinit_alt 1610REM set up options in window 1620PROCicon_select(main%,2,show_icon%) 1630PROCicon_select(main%,3,allow_quit%) 1640PROCicon_select(main%,4,quit_when_done%) 1650PROCwindow_popup(main%) 1660last%=0 1670PROCset(1) 1680ENDPROC 1690 1700DEF PROCcheck_all_tasks 1710REM check existing tasks to see if they are listed 1720call%=0 1730REPEAT 1740 SYS"TaskManager_EnumerateTasks",call%,q%,24 TO call% 1750 IF call%>0 THEN PROCcheck_task(FNstring(q%!4),!q%) 1760UNTIL call%<0 1770ENDPROC 1780 1790DEF PROCload_setup 1800setup_file$=my_dir$+".SetUp" 1810SYS"XOS_Find",64,setup_file$ TO handle%;ok% 1820ok%=((ok%AND1)=0)AND(handle%>0) 1830REM Check to see if file is there 1840IF ok% THEN 1850 REM If it is then load data else set default 1860 1870 INPUT#handle%,show_icon% 1880 INPUT#handle%,allow_quit% 1890 INPUT#handle%,quit_when_done% 1900 task%=1 1910 WHILE NOTEOF#handle% 1920 INPUT#handle%,task$(task%) 1930 INPUT#handle%,quit%(task%) 1940 INPUT#handle%,message%(task%) 1950 INPUT#handle%,message$(task%) 1960 task%+=1 1970 ENDWHILE 1980 CLOSE#handle% 1990ELSE 2000 show_icon%=FNicon_selected(main%,2) 2010 allow_quit%=FNicon_selected(main%,3) 2020 quit_when_done%=FNicon_selected(main%,4) 2030ENDIF 2040ENDPROC 2050 2060DEF PROCsave_setup 2070handle%=OPENOUT(setup_file$) 2080PRINT#handle%,show_icon% 2090PRINT#handle%,allow_quit% 2100PRINT#handle%,quit_when_done% 2110FOR task%=1 TO max_tasks% 2120 IF task$(task%)<>"" THEN 2130 PRINT#handle%,task$(task%) 2140 PRINT#handle%,quit%(task%) 2150 PRINT#handle%,message%(task%) 2160 PRINT#handle%,message$(task%) 2170 ENDIF 2180NEXT task% 2190CLOSE#handle% 2200ENDPROC 2210 2220DEF PROCset(new%) 2230REM Set options, etc. in set up window 2240IF last% THEN PROCget 2250PROCicon_set_text(main%,11,task$(new%)) 2260PROCicon_select(main%,14,quit%(new%)) 2270PROCicon_select(main%,15,message%(new%)) 2280PROCicon_set_text(main%,16,message$(new%)) 2290PROCicon_set_text(main%,7,STR$(new%)) 2300PROCcaret_reset(main%) 2310last%=new% 2320ENDPROC 2330 2340DEF PROCget 2350REM Get options that have been set in set up window 2360show_icon%=FNicon_selected(main%,2) 2370allow_quit%=FNicon_selected(main%,3) 2380quit_when_done%=FNicon_selected(main%,4) 2390task$(last%)=FNstrip_end_spaces(FNicon_text(main%,11)) 2400quit%(last%)=FNicon_selected(main%,14) 2410message%(last%)=FNicon_selected(main%,15) 2420message$(last%)=FNstrip_end_spaces(FNicon_text(main%,16)) 2430ENDPROC 2440 2450DEF PROCopen_task_menu 2460block_ind%=ind% 2470block%=FNstart_menu("Tasks") 2480call%=0 2490REPEAT 2500 SYS"TaskManager_EnumerateTasks",call%,q%,24 TO call% 2510 IF call%>0 THEN 2520 $block_ind%=FNstring(q%!4) 2530 PROCmenu_ind_item(block_ind%,-1,LEN$block_ind%+1) 2540 REM Add each task found to the menu 2550 2560 block_ind%+=LEN$block_ind%+1 2570 ENDIF 2580UNTIL call%<0 2590PROCend_menu 2600menu_block%=block% 2610 2620PROCicon_info(main%,13) 2630PROCopen_menu(menu_block%,q%!16+wx%,q%!20+wy%) 2640ENDPROC 2650 2660DEF PROCcheck_task(name$,handle%) 2670LOCAL a% 2680REM Check task against the wanted list 2690FOR task%=1 TO 16 2700 IF FNcaps(task$(task%))=FNcaps(name$) THEN PROCdo_action(task%,handle%) 2710NEXT task% 2720ENDPROC 2730 2740DEF PROCdo_action(task%,handle%) 2750REM Do whatever has to be done, it's for its own good you know 2760LOCAL report$ 2770IF message%(task%) THEN 2780 IF message$(task%)="" THEN 2790 REM If there is no message then make something up 2800 report$=FNmessage0("TM0",task$(task%)) 2810 IF quit%(task%) THEN report$+=FNmessage("TM1") 2820 ELSE 2830 report$=message$(task%) 2840 ENDIF 2850 PROCreport_error(report$) 2860ENDIF 2870 2880IF quit%(task%) THEN 2890 REM Kill the task if the warrant has been signed 2900 !q%=20 2910 q%!16=0 2920 SYS"Wimp_SendMessage",17,q%,handle% 2930ENDIF 2940 2950IF quit_when_done% THEN exit%=TRUE 2960REM Commit suicide if the crime was too much 2970 2980ENDPROC 2990 3000DEF PROCdo_help 3010help_alt$="" 3020CASE q%!32 OF 3030 WHEN info% : help_token$="info" 3040 WHEN main% 3050 help_alt$="setup" 3060 help_token$=help_alt$+STR$(q%!36) 3070 WHEN -2 : help_token$="IB" 3080OTHERWISE 3090 IF alt% THEN 3100 help_token$="TM" 3110 ELSE 3120 SYS"Wimp_GetMenuState",1,q%+40,q%!32,q%!36 3130 help_token$="IM"+STR$(q%!40) 3140 ENDIF 3150ENDCASE 3160help_string$=FNmessage("help_"+help_token$) 3170IF help_string$="" THEN help_string$=FNmessage("help_"+help_alt$) 3180q%!12=q%!8 3190q%!16=&503 3200$(q%+20)=help_string$+CHR$0 3210!q%=(24+LENhelp_string$)ANDNOT3 3220SYS"Wimp_SendMessage",17,q%,q%!4 3230ENDPROC 3240 3250DEF FNicon_create(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,$(q%+24)) 3260LOCAL icon% 3270SYS"Wimp_CreateIcon",,q% TO icon% 3280=icon% 3290 3300DEF PROCicon_info(!q%,q%!4) 3310SYS"Wimp_GetIconState",,q% 3320ENDPROC 3330 3340DEF PROCicon_select(!q%,q%!4,select%) 3350SYS"Wimp_GetIconState",,q% 3360IF select% THEN q%!8=1<<21 ELSE q%!8=0 3370q%!12=1<<21 3380IF (q%!24 AND q%!12)<>q%!8 THEN SYS"Wimp_SetIconState",,q% 3390ENDPROC 3400 3410DEF FNicon_selected(!q%,q%!4) 3420SYS"Wimp_GetIconState",,q% 3430=(((q%!24)AND(1<<21))>0) 3440 3450DEF PROCicon_set_text(!q%,q%!4,text$) 3460SYS"Wimp_GetIconState",,q% 3470text$=LEFT$(text$,q%!36-1) 3480IF $(q%!28)<>text$ THEN 3490$(q%!28)=text$ 3500q%!8=0 3510q%!12=0 3520SYS"Wimp_SetIconState",,q% 3530ENDIF 3540ENDPROC 3550 3560DEF FNicon_text(!q%,q%!4) 3570SYS"Wimp_GetIconState",,q% 3580=$(q%!28) 3590 3600DEF PROCcaret_place(wind%,icon%,index%) 3610LOCAL len% 3620len%=LEN(FNicon_text(wind%,icon%)) 3630IF index%>len% THEN index%=len% 3640SYS"Wimp_SetCaretPosition",wind%,icon%,,,-1,index% 3650ENDPROC 3660 3670DEF PROCcaret_reset(wind%) 3680SYS"Wimp_GetCaretPosition",,q% 3690IF !q%=wind% THEN PROCcaret_place(wind%,q%!4,q%!20) 3700ENDPROC 3710 3720DEF FNload_template(title$) 3730SYS"Wimp_LoadTemplate",,q%,ind%,indend%,-1,title$ TO ,,ind% 3740SYS"Wimp_CreateWindow",,q% TO wind% 3750=wind% 3760 3770DEF PROCwindow_popup(!q%) 3780SYS"Wimp_GetWindowState",,q% 3790q%!28=-1 3800PROCwindow_open(q%) 3810ENDPROC 3820 3830DEF PROCwindow_open(q%) 3840wx%=q%!4-q%!20 3850wy%=q%!16-q%!24 3860SYS"Wimp_OpenWindow",,q% 3870ENDPROC 3880 3890DEF PROCopen_menu(menu%,mx%,my%) 3900SYS"Wimp_CreateMenu",,menu%,mx%,my% 3910open_menu%=menu% 3920ENDPROC 3930 3940DEF FNstart_menu(name$) 3950longest%=LENname$ 3960menu_start%=menu_block% 3970$menu_block%=name$ 3980menu_block%!12=&70207 3990menu_block%!20=44 4000menu_block%!24=0 4010menu_block%+=28 4020=menu_start% 4030 4040DEF PROCmenu_item(item$,link%) 4050IF LENitem$>longest% THEN longest%=LENitem$ 4060!menu_block%=0 4070menu_block%!4=link% 4080menu_block%!8=&7000021 4090$(menu_block%+12)=item$ 4100menu_block%+=24 4110ENDPROC 4120 4130DEF PROCmenu_ind_item(text%,valid%,len%) 4140IF len%-1>longest% THEN longest%=len%-1 4150!menu_block%=0 4160menu_block%!4=0 4170menu_block%!8=&7000121 4180menu_block%!12=text% 4190menu_block%!16=valid% 4200menu_block%!20=len% 4210menu_block%+=24 4220ENDPROC 4230 4240DEF PROCend_menu 4250menu_start%!16=(longest%+1)*16 4260!(menu_block%-24)=!(menu_block%-24) OR &80 4270ENDPROC 4280 4290DEF PROCmenu_shade(menu%,item%,shade%) 4300p%=menu%+36+item%*24 4310!p%=!p% ANDNOT(1<<22) 4320IF shade% THEN !p%=!p% OR(1<<22) 4330ENDPROC 4340 4350DEF PROCmessage_load(message_file$) 4360SYS"MessageTrans_FileInfo",,message_file$ TO ,,message_size%;ok% 4370DIM messages% message_size% 4380DIM message_desc% 16 4390DIM message_buffer% 256 4400SYS"MessageTrans_OpenFile",message_desc%,message_file$,messages% 4410ENDPROC 4420 4430DEF FNmessage(token$) 4440SYS"XMessageTrans_Lookup",message_desc%,token$,message_buffer%,255 TO ;ok% 4450IF (ok%AND1)=1 THEN ?message_buffer%=0 4460=FNstring(message_buffer%) 4470 4480DEF FNmessage0(token$,st0$) 4490SYS"XMessageTrans_Lookup",message_desc%,token$,message_buffer%,255,st0$ TO ;ok% 4500IF (ok%AND1)=1 THEN ?message_buffer%=0 4510=FNstring(message_buffer%) 4520 4530DEF PROCmessage_close 4540SYS"MessageTrans_CloseFile",message_desc% 4550ENDPROC 4560 4570DEF FNstring(pos%) 4580LOCAL st$ 4590WHILE ?pos%>31 4600 st$+=CHR$(?pos%) 4610 pos%+=1 4620ENDWHILE 4630=st$ 4640 4650DEF FNcaps(st$) 4660LOCAL a% 4670IF LENst$ THEN 4680 IF MID$(st$,a%,1)>="a" AND MID$(st$,a%,1)<="z" THEN MID$(st$,a%,1)=CHR$(ASC(MID$(st$,a%,1))-32) 4690ENDIF 4700=st$ 4710 4720DEF FNstrip_end_spaces(st$) 4730WHILE RIGHT$(st$,1)=" " 4740 st$=MID$(st$,LENst$-1) 4750ENDWHILE 4760=st$ 4770 4780DEF PROCreport_error($(q%+4)) 4790REM Whoops something has gone wrong! 4800!q%=255 4810SYS"Wimp_ReportError",q%,1,my_name$ 4820ENDPROC
� > <LookOut$Dir>.!RunImage (� Written by Barry Wickett, April 96 � (� Queries to: 2� Barry Wickett <� 14 New Zealand Road F� Cardiff P� CF4 3BR Z d� �(-3) � alt%=� � alt%=� n-� check to see if an ALT key is depressed x �my_dir$="<LookOut$Dir>" � �&�message_load(my_dir$+".Messages") � �my_name$=�message("PGN") � �� message_block% 12 �!message_block%=&502 �message_block%!4=&400C2 �message_block%!8=0 �<� Tell the Wimp only to bother me with these 3 messages. � �Iș"Wimp_Initialise",310,&4B534154,my_name$,message_block% � ,my_task% ,� � �report_error(�$+" at line "+�(�)):� "indsize%=3000 ,.� q% 1200, ind% indsize%, menu_block% 1000 6indend%=ind%+indsize% @@� set up general block, indirected icon block and menu block J T/ș"Wimp_OpenTemplate",,my_dir$+".Templates" ^� alt% � h# main%=�load_template("setup") r info%=0 |� �" info%=�load_template("info") � main%=0 �� �ș"Wimp_CloseTemplate" � ��init_setup � �*� show_icon% � alt%=� � �init_icon_bar � �)� alt% � �init_alt � �check_all_tasks � �exit%=� � � " ș"Wimp_Poll",1,q% � reason% Ȏ reason% � & � 2 : �window_open(q%) 05 � 6 : �mouse_click(!q%,q%!4,q%!8,q%!12,q%!16) :* � 8 : �key_pressed(!q%,q%!4,q%!24) D � 9 : �menu_select N! � 17,18 : �message(q%!16) X � b� exit% l v?� alt% � ș"Wimp_Poll",0,q% : � fudge for highlighted icons � ��message_close � �ș"Wimp_CloseDown" � � � Bye! � �� � �,� �mouse_click(mx%,my%,but%,wind%,icon%) �Ȏ wind% � � �I � -2 : � but%=2 � �open_menu(bar_menu%,mx%-(bar_menu%!16)/2-16,184) D � If menu button has been pressed over icon bar then open menu � main% � but%=4 � * Ȏ icon% � 4 � 9,10 >+ � Icons to change task number H& new%=last%+(icon%-9)*2-1 R( � new%<1 � new%=max_tasks% \( � new%>max_tasks% � new%=1 f9 � Make sure the new task number is in range p �set(new%) z �" � 13 : �open_task_menu � � Task menu icon � � � 17 : exit%=� � � Cancel icon � � � 18 � �get � �save_setup � exit%=� � � Save icon � � � � � � $ .$� �key_pressed(wind%,icon%,key%) 8ș"Wimp_ProcessKey",key% B)� Pass on all keys passed to Look Out L� V `� �menu_select j� alt% � t* � Check which menu I am dealing with ~ � !q%>=0 � �B �icon_set_text(main%,11,�string(!(menu_block%+40+!q%*24))) �+ � Set new task name from menu block � � �caret_reset(main%) �8 � Make sure the caret is now in a sensible place � � �� � � !q%=1 � exit%=� �$ � Quit option on icon bar menu �� �� � � �message(type%) Ȏ type% � # � 0 : � allow_quit% � exit%=� ! � It was nice knowing you ( 2 � &502 : �do_help <' � 'Cos I'm a nice helpful chap! F P< � &400C2 : � alt%=� � �check_task(�string(q%+28),q%!4) Z% � Check if new task is listed d� n� x �� �init_setup �max_tasks%=16 �S� task$(max_tasks%),quit%(max_tasks%),message%(max_tasks%),message$(max_tasks%) ��load_setup �� � �� �init_icon_bar �8my_icon%=�icon_create(-2,0,0,68,68,&2002,"!lookout") � �#bar_menu%=�start_menu(my_name$) �&�menu_item(�message("MI0:"),info%) �"�menu_item(�message("MI1:"),0) � �end_menu B� Create icon bar icon if set up allows it and not in alt mode ,�menu_shade(bar_menu%,1,(allow_quit%=�)) ")� Shade out quit option if disallowed ,� 6 @� �init_alt J� set up options in window T$�icon_select(main%,2,show_icon%) ^%�icon_select(main%,3,allow_quit%) h)�icon_select(main%,4,quit_when_done%) r�window_popup(main%) |last%=0 ��set(1) �� � �� �check_all_tasks �4� check existing tasks to see if they are listed �call%=0 �� �8 ș"TaskManager_EnumerateTasks",call%,q%,24 � call% �0 � call%>0 � �check_task(�string(q%!4),!q%) � � call%<0 �� � �� �load_setup setup_file$=my_dir$+".SetUp" -ș"XOS_Find",64,setup_file$ � handle%;ok% ok%=((ok%�1)=0)�(handle%>0) &#� Check to see if file is there 0� ok% � :0 � If it is then load data else set default D N �#handle%,show_icon% X �#handle%,allow_quit% b �#handle%,quit_when_done% l task%=1 v ȕ ��#handle% � �#handle%,task$(task%) � �#handle%,quit%(task%) �! �#handle%,message%(task%) �! �#handle%,message$(task%) � task%+=1 � � � �#handle% �� �( show_icon%=�icon_selected(main%,2) �) allow_quit%=�icon_selected(main%,3) �- quit_when_done%=�icon_selected(main%,4) �� �� � �save_setup handle%=�(setup_file$) �#handle%,show_icon% *�#handle%,allow_quit% 4�#handle%,quit_when_done% >� task%=1 � max_tasks% H � task$(task%)<>"" � R �#handle%,task$(task%) \ �#handle%,quit%(task%) f! �#handle%,message%(task%) p! �#handle%,message$(task%) z � �� task% � �#handle% �� � �� �set(new%) �(� Set options, etc. in set up window �� last% � �get �(�icon_set_text(main%,11,task$(new%)) �&�icon_select(main%,14,quit%(new%)) �)�icon_select(main%,15,message%(new%)) �+�icon_set_text(main%,16,message$(new%)) �#�icon_set_text(main%,7,�(new%)) ��caret_reset(main%) last%=new% � $ � �get .5� Get options that have been set in set up window 8&show_icon%=�icon_selected(main%,2) B'allow_quit%=�icon_selected(main%,3) L+quit_when_done%=�icon_selected(main%,4) V8task$(last%)=�strip_end_spaces(�icon_text(main%,11)) `)quit%(last%)=�icon_selected(main%,14) j,message%(last%)=�icon_selected(main%,15) t;message$(last%)=�strip_end_spaces(�icon_text(main%,16)) ~� � �� �open_task_menu �block_ind%=ind% �block%=�start_menu("Tasks") �call%=0 �� �8 ș"TaskManager_EnumerateTasks",call%,q%,24 � call% � � call%>0 � �! $block_ind%=�string(q%!4) �4 �menu_ind_item(block_ind%,-1,�$block_ind%+1) �) � Add each task found to the menu � " block_ind%+=�$block_ind%+1 � � call%<0 �end_menu (menu_block%=block% 2 <�icon_info(main%,13) F/�open_menu(menu_block%,q%!16+wx%,q%!20+wy%) P� Z d � �check_task(name$,handle%) n� a% x(� Check task against the wanted list �� task%=1 � 16 �D � �caps(task$(task%))=�caps(name$) � �do_action(task%,handle%) �� task% �� � �� �do_action(task%,handle%) �@� Do whatever has to be done, it's for its own good you know � � report$ �� message%(task%) � � � message$(task%)="" � �7 � If there is no message then make something up �- report$=�message0("TM0",task$(task%)) �1 � quit%(task%) � report$+=�message("TM1") � report$=message$(task%) � " �report_error(report$) ,� 6 @� quit%(task%) � J4 � Kill the task if the warrant has been signed T !q%=20 ^ q%!16=0 h( ș"Wimp_SendMessage",17,q%,handle% r� | �� quit_when_done% � exit%=� �.� Commit suicide if the crime was too much � �� � �� �do_help �help_alt$="" �Ȏ q%!32 � �" � info% : help_token$="info" � � main% � help_alt$="setup" �& help_token$=help_alt$+�(q%!36) � � -2 : help_token$="IB" � alt% � help_token$="TM" & � 01 ș"Wimp_GetMenuState",1,q%+40,q%!32,q%!36 :! help_token$="IM"+�(q%!40) D � N� X.help_string$=�message("help_"+help_token$) b@� help_string$="" � help_string$=�message("help_"+help_alt$) lq%!12=q%!8 vq%!16=&503 �$(q%+20)=help_string$+�0 �!q%=(24+�help_string$)��3 �#ș"Wimp_SendMessage",17,q%,q%!4 �� � �<� �icon_create(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,$(q%+24)) �� icon% �#ș"Wimp_CreateIcon",,q% � icon% � =icon% � �� �icon_info(!q%,q%!4) �ș"Wimp_GetIconState",,q% �� $� �icon_select(!q%,q%!4,select%) ș"Wimp_GetIconState",,q% #� select% � q%!8=1<<21 � q%!8=0 *q%!12=1<<21 47� (q%!24 � q%!12)<>q%!8 � ș"Wimp_SetIconState",,q% >� H R� �icon_selected(!q%,q%!4) \ș"Wimp_GetIconState",,q% f=(((q%!24)�(1<<21))>0) p z$� �icon_set_text(!q%,q%!4,text$) �ș"Wimp_GetIconState",,q% �text$=�text$,q%!36-1) �� $(q%!28)<>text$ � �$(q%!28)=text$ � q%!8=0 �q%!12=0 �ș"Wimp_SetIconState",,q% �� �� � �� �icon_text(!q%,q%!4) �ș"Wimp_GetIconState",,q% � =$(q%!28) &� �caret_place(wind%,icon%,index%) � len% $#len%=�(�icon_text(wind%,icon%)) .� index%>len% � index%=len% 85ș"Wimp_SetCaretPosition",wind%,icon%,,,-1,index% B� L V� �caret_reset(wind%) `!ș"Wimp_GetCaretPosition",,q% j0� !q%=wind% � �caret_place(wind%,q%!4,q%!20) t� ~ �� �load_template(title$) �=ș"Wimp_LoadTemplate",,q%,ind%,indend%,-1,title$ � ,,ind% �%ș"Wimp_CreateWindow",,q% � wind% � =wind% � �� �window_popup(!q%) �ș"Wimp_GetWindowState",,q% �q%!28=-1 ��window_open(q%) �� � �� �window_open(q%) wx%=q%!4-q%!20 wy%=q%!16-q%!24 ș"Wimp_OpenWindow",,q% � ( 2� �open_menu(menu%,mx%,my%) <&ș"Wimp_CreateMenu",,menu%,mx%,my% Fopen_menu%=menu% P� Z d� �start_menu(name$) nlongest%=�name$ xmenu_start%=menu_block% �$menu_block%=name$ �menu_block%!12=&70207 �menu_block%!20=44 �menu_block%!24=0 �menu_block%+=28 �=menu_start% � �� �menu_item(item$,link%) �'� �item$>longest% � longest%=�item$ �!menu_block%=0 �menu_block%!4=link% �menu_block%!8=&7000021 �$(menu_block%+12)=item$ menu_block%+=24 � "'� �menu_ind_item(text%,valid%,len%) ,'� len%-1>longest% � longest%=len%-1 6!menu_block%=0 @menu_block%!4=0 Jmenu_block%!8=&7000121 Tmenu_block%!12=text% ^menu_block%!16=valid% hmenu_block%!20=len% rmenu_block%+=24 |� � �� �end_menu �"menu_start%!16=(longest%+1)*16 �-!(menu_block%-24)=!(menu_block%-24) � &80 �� � �%� �menu_shade(menu%,item%,shade%) �p%=menu%+36+item%*24 �!p%=!p% ��(1<<22) �� shade% � !p%=!p% �(1<<22) �� � �"� �message_load(message_file$) Bș"MessageTrans_FileInfo",,message_file$ � ,,message_size%;ok% � messages% message_size% � message_desc% 16 &� message_buffer% 256 0Cș"MessageTrans_OpenFile",message_desc%,message_file$,messages% :� D N� �message(token$) XLș"XMessageTrans_Lookup",message_desc%,token$,message_buffer%,255 � ;ok% b$� (ok%�1)=1 � ?message_buffer%=0 l=�string(message_buffer%) v �� �message0(token$,st0$) �Qș"XMessageTrans_Lookup",message_desc%,token$,message_buffer%,255,st0$ � ;ok% �$� (ok%�1)=1 � ?message_buffer%=0 �=�string(message_buffer%) � �� �message_close �,ș"MessageTrans_CloseFile",message_desc% �� � �� �string(pos%) � � st$ �ȕ ?pos%>31 � st$+=�(?pos%) pos%+=1 � =st$ *� �caps(st$) 4� a% >� �st$ � HJ � �st$,a%,1)>="a" � �st$,a%,1)<="z" � �st$,a%,1)=�(�(�st$,a%,1))-32) R� \=st$ f p� �strip_end_spaces(st$) zȕ �st$,1)=" " � st$=�st$,�st$-1) �� �=st$ � �� �report_error($(q%+4)) �&� Whoops something has gone wrong! �!q%=255 �&ș"Wimp_ReportError",q%,1,my_name$ �� �
00000000 0d 00 0a 1f f4 20 3e 20 3c 4c 6f 6f 6b 4f 75 74 |..... > <LookOut| 00000010 24 44 69 72 3e 2e 21 52 75 6e 49 6d 61 67 65 0d |$Dir>.!RunImage.| 00000020 00 14 28 f4 20 57 72 69 74 74 65 6e 20 62 79 20 |..(. Written by | 00000030 42 61 72 72 79 20 57 69 63 6b 65 74 74 2c 20 41 |Barry Wickett, A| 00000040 70 72 69 6c 20 39 36 0d 00 1e 05 f4 0d 00 28 11 |pril 96.......(.| 00000050 f4 20 51 75 65 72 69 65 73 20 74 6f 3a 0d 00 32 |. Queries to:..2| 00000060 14 f4 20 20 42 61 72 72 79 20 57 69 63 6b 65 74 |.. Barry Wicket| 00000070 74 0d 00 3c 1a f4 20 20 31 34 20 4e 65 77 20 5a |t..<.. 14 New Z| 00000080 65 61 6c 61 6e 64 20 52 6f 61 64 0d 00 46 0e f4 |ealand Road..F..| 00000090 20 20 43 61 72 64 69 66 66 0d 00 50 0e f4 20 20 | Cardiff..P.. | 000000a0 43 46 34 20 33 42 52 0d 00 5a 04 0d 00 64 1d e7 |CF4 3BR..Z...d..| 000000b0 20 a6 28 2d 33 29 20 8c 20 61 6c 74 25 3d b9 20 | .(-3) . alt%=. | 000000c0 8b 20 61 6c 74 25 3d a3 0d 00 6e 2d f4 20 63 68 |. alt%=...n-. ch| 000000d0 65 63 6b 20 74 6f 20 73 65 65 20 69 66 20 61 6e |eck to see if an| 000000e0 20 41 4c 54 20 6b 65 79 20 69 73 20 64 65 70 72 | ALT key is depr| 000000f0 65 73 73 65 64 0d 00 78 04 0d 00 82 1b 6d 79 5f |essed..x.....my_| 00000100 64 69 72 24 3d 22 3c 4c 6f 6f 6b 4f 75 74 24 44 |dir$="<LookOut$D| 00000110 69 72 3e 22 0d 00 8c 04 0d 00 96 26 f2 6d 65 73 |ir>".......&.mes| 00000120 73 61 67 65 5f 6c 6f 61 64 28 6d 79 5f 64 69 72 |sage_load(my_dir| 00000130 24 2b 22 2e 4d 65 73 73 61 67 65 73 22 29 0d 00 |$+".Messages")..| 00000140 a0 04 0d 00 aa 1c 6d 79 5f 6e 61 6d 65 24 3d a4 |......my_name$=.| 00000150 6d 65 73 73 61 67 65 28 22 50 47 4e 22 29 0d 00 |message("PGN")..| 00000160 b4 04 0d 00 be 17 de 20 6d 65 73 73 61 67 65 5f |....... message_| 00000170 62 6c 6f 63 6b 25 20 31 32 0d 00 c8 18 21 6d 65 |block% 12....!me| 00000180 73 73 61 67 65 5f 62 6c 6f 63 6b 25 3d 26 35 30 |ssage_block%=&50| 00000190 32 0d 00 d2 1b 6d 65 73 73 61 67 65 5f 62 6c 6f |2....message_blo| 000001a0 63 6b 25 21 34 3d 26 34 30 30 43 32 0d 00 dc 16 |ck%!4=&400C2....| 000001b0 6d 65 73 73 61 67 65 5f 62 6c 6f 63 6b 25 21 38 |message_block%!8| 000001c0 3d 30 0d 00 e6 3c f4 20 54 65 6c 6c 20 74 68 65 |=0...<. Tell the| 000001d0 20 57 69 6d 70 20 6f 6e 6c 79 20 74 6f 20 62 6f | Wimp only to bo| 000001e0 74 68 65 72 20 6d 65 20 77 69 74 68 20 74 68 65 |ther me with the| 000001f0 73 65 20 33 20 6d 65 73 73 61 67 65 73 2e 0d 00 |se 3 messages...| 00000200 f0 04 0d 00 fa 49 c8 99 22 57 69 6d 70 5f 49 6e |.....I.."Wimp_In| 00000210 69 74 69 61 6c 69 73 65 22 2c 33 31 30 2c 26 34 |itialise",310,&4| 00000220 42 35 33 34 31 35 34 2c 6d 79 5f 6e 61 6d 65 24 |B534154,my_name$| 00000230 2c 6d 65 73 73 61 67 65 5f 62 6c 6f 63 6b 25 20 |,message_block% | 00000240 b8 20 2c 6d 79 5f 74 61 73 6b 25 0d 01 04 04 0d |. ,my_task%.....| 00000250 01 0e 2c ee 20 85 20 f2 72 65 70 6f 72 74 5f 65 |..,. . .report_e| 00000260 72 72 6f 72 28 f6 24 2b 22 20 61 74 20 6c 69 6e |rror(.$+" at lin| 00000270 65 20 22 2b c3 28 9e 29 29 3a e0 0d 01 18 04 0d |e "+.(.)):......| 00000280 01 22 11 69 6e 64 73 69 7a 65 25 3d 33 30 30 30 |.".indsize%=3000| 00000290 0d 01 2c 2e de 20 71 25 20 31 32 30 30 2c 20 69 |..,.. q% 1200, i| 000002a0 6e 64 25 20 69 6e 64 73 69 7a 65 25 2c 20 6d 65 |nd% indsize%, me| 000002b0 6e 75 5f 62 6c 6f 63 6b 25 20 31 30 30 30 0d 01 |nu_block% 1000..| 000002c0 36 19 69 6e 64 65 6e 64 25 3d 69 6e 64 25 2b 69 |6.indend%=ind%+i| 000002d0 6e 64 73 69 7a 65 25 0d 01 40 40 f4 20 73 65 74 |ndsize%..@@. set| 000002e0 20 75 70 20 67 65 6e 65 72 61 6c 20 62 6c 6f 63 | up general bloc| 000002f0 6b 2c 20 69 6e 64 69 72 65 63 74 65 64 20 69 63 |k, indirected ic| 00000300 6f 6e 20 62 6c 6f 63 6b 20 61 6e 64 20 6d 65 6e |on block and men| 00000310 75 20 62 6c 6f 63 6b 0d 01 4a 04 0d 01 54 2f c8 |u block..J...T/.| 00000320 99 22 57 69 6d 70 5f 4f 70 65 6e 54 65 6d 70 6c |."Wimp_OpenTempl| 00000330 61 74 65 22 2c 2c 6d 79 5f 64 69 72 24 2b 22 2e |ate",,my_dir$+".| 00000340 54 65 6d 70 6c 61 74 65 73 22 0d 01 5e 0c e7 20 |Templates"..^.. | 00000350 61 6c 74 25 20 8c 0d 01 68 23 20 20 6d 61 69 6e |alt% ...h# main| 00000360 25 3d a4 6c 6f 61 64 5f 74 65 6d 70 6c 61 74 65 |%=.load_template| 00000370 28 22 73 65 74 75 70 22 29 0d 01 72 0d 20 20 69 |("setup")..r. i| 00000380 6e 66 6f 25 3d 30 0d 01 7c 05 cc 0d 01 86 22 20 |nfo%=0..|....." | 00000390 20 69 6e 66 6f 25 3d a4 6c 6f 61 64 5f 74 65 6d | info%=.load_tem| 000003a0 70 6c 61 74 65 28 22 69 6e 66 6f 22 29 0d 01 90 |plate("info")...| 000003b0 0d 20 20 6d 61 69 6e 25 3d 30 0d 01 9a 05 cd 0d |. main%=0......| 000003c0 01 a4 1a c8 99 22 57 69 6d 70 5f 43 6c 6f 73 65 |....."Wimp_Close| 000003d0 54 65 6d 70 6c 61 74 65 22 0d 01 ae 04 0d 01 b8 |Template".......| 000003e0 0f f2 69 6e 69 74 5f 73 65 74 75 70 0d 01 c2 04 |..init_setup....| 000003f0 0d 01 cc 2a e7 20 73 68 6f 77 5f 69 63 6f 6e 25 |...*. show_icon%| 00000400 20 80 20 61 6c 74 25 3d a3 20 8c 20 f2 69 6e 69 | . alt%=. . .ini| 00000410 74 5f 69 63 6f 6e 5f 62 61 72 0d 01 d6 04 0d 01 |t_icon_bar......| 00000420 e0 29 e7 20 61 6c 74 25 20 8c 20 f2 69 6e 69 74 |.). alt% . .init| 00000430 5f 61 6c 74 20 8b 20 f2 63 68 65 63 6b 5f 61 6c |_alt . .check_al| 00000440 6c 5f 74 61 73 6b 73 0d 01 ea 04 0d 01 f4 0b 65 |l_tasks........e| 00000450 78 69 74 25 3d a3 0d 01 fe 04 0d 02 08 05 f5 0d |xit%=...........| 00000460 02 12 22 20 20 c8 99 22 57 69 6d 70 5f 50 6f 6c |.." .."Wimp_Pol| 00000470 6c 22 2c 31 2c 71 25 20 b8 20 72 65 61 73 6f 6e |l",1,q% . reason| 00000480 25 0d 02 1c 12 20 20 c8 8e 20 72 65 61 73 6f 6e |%.... .. reason| 00000490 25 20 ca 0d 02 26 1e 20 20 20 20 c9 20 32 20 3a |% ...&. . 2 :| 000004a0 20 f2 77 69 6e 64 6f 77 5f 6f 70 65 6e 28 71 25 | .window_open(q%| 000004b0 29 0d 02 30 35 20 20 20 20 c9 20 36 20 3a 20 f2 |)..05 . 6 : .| 000004c0 6d 6f 75 73 65 5f 63 6c 69 63 6b 28 21 71 25 2c |mouse_click(!q%,| 000004d0 71 25 21 34 2c 71 25 21 38 2c 71 25 21 31 32 2c |q%!4,q%!8,q%!12,| 000004e0 71 25 21 31 36 29 0d 02 3a 2a 20 20 20 20 c9 20 |q%!16)..:* . | 000004f0 38 20 3a 20 f2 6b 65 79 5f 70 72 65 73 73 65 64 |8 : .key_pressed| 00000500 28 21 71 25 2c 71 25 21 34 2c 71 25 21 32 34 29 |(!q%,q%!4,q%!24)| 00000510 0d 02 44 1a 20 20 20 20 c9 20 39 20 3a 20 f2 6d |..D. . 9 : .m| 00000520 65 6e 75 5f 73 65 6c 65 63 74 0d 02 4e 21 20 20 |enu_select..N! | 00000530 20 20 c9 20 31 37 2c 31 38 20 3a 20 f2 6d 65 73 | . 17,18 : .mes| 00000540 73 61 67 65 28 71 25 21 31 36 29 0d 02 58 07 20 |sage(q%!16)..X. | 00000550 20 cb 0d 02 62 0b fd 20 65 78 69 74 25 0d 02 6c | ...b.. exit%..l| 00000560 04 0d 02 76 3f e7 20 61 6c 74 25 20 8c 20 c8 99 |...v?. alt% . ..| 00000570 22 57 69 6d 70 5f 50 6f 6c 6c 22 2c 30 2c 71 25 |"Wimp_Poll",0,q%| 00000580 20 3a 20 f4 20 66 75 64 67 65 20 66 6f 72 20 68 | : . fudge for h| 00000590 69 67 68 6c 69 67 68 74 65 64 20 69 63 6f 6e 73 |ighlighted icons| 000005a0 0d 02 80 04 0d 02 8a 12 f2 6d 65 73 73 61 67 65 |.........message| 000005b0 5f 63 6c 6f 73 65 0d 02 94 04 0d 02 9e 16 c8 99 |_close..........| 000005c0 22 57 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 6e 22 |"Wimp_CloseDown"| 000005d0 0d 02 a8 04 0d 02 b2 0a f4 20 42 79 65 21 0d 02 |......... Bye!..| 000005e0 bc 04 0d 02 c6 05 e0 0d 02 d0 04 0d 02 da 2c dd |..............,.| 000005f0 20 f2 6d 6f 75 73 65 5f 63 6c 69 63 6b 28 6d 78 | .mouse_click(mx| 00000600 25 2c 6d 79 25 2c 62 75 74 25 2c 77 69 6e 64 25 |%,my%,but%,wind%| 00000610 2c 69 63 6f 6e 25 29 0d 02 e4 0e c8 8e 20 77 69 |,icon%)...... wi| 00000620 6e 64 25 20 ca 0d 02 ee 04 0d 02 f8 49 20 20 c9 |nd% ........I .| 00000630 20 2d 32 20 3a 20 e7 20 62 75 74 25 3d 32 20 8c | -2 : . but%=2 .| 00000640 20 f2 6f 70 65 6e 5f 6d 65 6e 75 28 62 61 72 5f | .open_menu(bar_| 00000650 6d 65 6e 75 25 2c 6d 78 25 2d 28 62 61 72 5f 6d |menu%,mx%-(bar_m| 00000660 65 6e 75 25 21 31 36 29 2f 32 2d 31 36 2c 31 38 |enu%!16)/2-16,18| 00000670 34 29 0d 03 02 44 20 20 f4 20 49 66 20 6d 65 6e |4)...D . If men| 00000680 75 20 62 75 74 74 6f 6e 20 68 61 73 20 62 65 65 |u button has bee| 00000690 6e 20 70 72 65 73 73 65 64 20 6f 76 65 72 20 69 |n pressed over i| 000006a0 63 6f 6e 20 62 61 72 20 74 68 65 6e 20 6f 70 65 |con bar then ope| 000006b0 6e 20 6d 65 6e 75 0d 03 0c 04 0d 03 16 0d 20 20 |n menu........ | 000006c0 c9 20 6d 61 69 6e 25 0d 03 20 12 20 20 20 20 e7 |. main%.. . .| 000006d0 20 62 75 74 25 3d 34 20 8c 0d 03 2a 14 20 20 20 | but%=4 ...*. | 000006e0 20 20 20 c8 8e 20 69 63 6f 6e 25 20 ca 0d 03 34 | .. icon% ...4| 000006f0 12 20 20 20 20 20 20 20 20 c9 20 39 2c 31 30 0d |. . 9,10.| 00000700 03 3e 2b 20 20 20 20 20 20 20 20 20 20 f4 20 49 |.>+ . I| 00000710 63 6f 6e 73 20 74 6f 20 63 68 61 6e 67 65 20 74 |cons to change t| 00000720 61 73 6b 20 6e 75 6d 62 65 72 0d 03 48 26 20 20 |ask number..H& | 00000730 20 20 20 20 20 20 20 20 6e 65 77 25 3d 6c 61 73 | new%=las| 00000740 74 25 2b 28 69 63 6f 6e 25 2d 39 29 2a 32 2d 31 |t%+(icon%-9)*2-1| 00000750 0d 03 52 28 20 20 20 20 20 20 20 20 20 20 e7 20 |..R( . | 00000760 6e 65 77 25 3c 31 20 8c 20 6e 65 77 25 3d 6d 61 |new%<1 . new%=ma| 00000770 78 5f 74 61 73 6b 73 25 0d 03 5c 28 20 20 20 20 |x_tasks%..\( | 00000780 20 20 20 20 20 20 e7 20 6e 65 77 25 3e 6d 61 78 | . new%>max| 00000790 5f 74 61 73 6b 73 25 20 8c 20 6e 65 77 25 3d 31 |_tasks% . new%=1| 000007a0 0d 03 66 39 20 20 20 20 20 20 20 20 20 20 f4 20 |..f9 . | 000007b0 4d 61 6b 65 20 73 75 72 65 20 74 68 65 20 6e 65 |Make sure the ne| 000007c0 77 20 74 61 73 6b 20 6e 75 6d 62 65 72 20 69 73 |w task number is| 000007d0 20 69 6e 20 72 61 6e 67 65 0d 03 70 18 20 20 20 | in range..p. | 000007e0 20 20 20 20 20 20 20 f2 73 65 74 28 6e 65 77 25 | .set(new%| 000007f0 29 0d 03 7a 04 0d 03 84 22 20 20 20 20 20 20 20 |)..z...." | 00000800 20 c9 20 31 33 20 3a 20 f2 6f 70 65 6e 5f 74 61 | . 13 : .open_ta| 00000810 73 6b 5f 6d 65 6e 75 0d 03 8e 1e 20 20 20 20 20 |sk_menu.... | 00000820 20 20 20 20 20 f4 20 54 61 73 6b 20 6d 65 6e 75 | . Task menu| 00000830 20 69 63 6f 6e 0d 03 98 04 0d 03 a2 1a 20 20 20 | icon........ | 00000840 20 20 20 20 20 c9 20 31 37 20 3a 20 65 78 69 74 | . 17 : exit| 00000850 25 3d b9 0d 03 ac 1b 20 20 20 20 20 20 20 20 20 |%=..... | 00000860 20 f4 20 43 61 6e 63 65 6c 20 69 63 6f 6e 0d 03 | . Cancel icon..| 00000870 b6 04 0d 03 c0 10 20 20 20 20 20 20 20 20 c9 20 |...... . | 00000880 31 38 0d 03 ca 12 20 20 20 20 20 20 20 20 20 20 |18.... | 00000890 f2 67 65 74 0d 03 d4 19 20 20 20 20 20 20 20 20 |.get.... | 000008a0 20 20 f2 73 61 76 65 5f 73 65 74 75 70 0d 03 de | .save_setup...| 000008b0 15 20 20 20 20 20 20 20 20 20 20 65 78 69 74 25 |. exit%| 000008c0 3d b9 0d 03 e8 19 20 20 20 20 20 20 20 20 20 20 |=..... | 000008d0 f4 20 53 61 76 65 20 69 63 6f 6e 0d 03 f2 04 0d |. Save icon.....| 000008e0 03 fc 0b 20 20 20 20 20 20 cb 0d 04 06 09 20 20 |... ..... | 000008f0 20 20 cd 0d 04 10 05 cb 0d 04 1a 05 e1 0d 04 24 | .............$| 00000900 04 0d 04 2e 24 dd 20 f2 6b 65 79 5f 70 72 65 73 |....$. .key_pres| 00000910 73 65 64 28 77 69 6e 64 25 2c 69 63 6f 6e 25 2c |sed(wind%,icon%,| 00000920 6b 65 79 25 29 0d 04 38 1c c8 99 22 57 69 6d 70 |key%)..8..."Wimp| 00000930 5f 50 72 6f 63 65 73 73 4b 65 79 22 2c 6b 65 79 |_ProcessKey",key| 00000940 25 0d 04 42 29 f4 20 50 61 73 73 20 6f 6e 20 61 |%..B). Pass on a| 00000950 6c 6c 20 6b 65 79 73 20 70 61 73 73 65 64 20 74 |ll keys passed t| 00000960 6f 20 4c 6f 6f 6b 20 4f 75 74 0d 04 4c 05 e1 0d |o Look Out..L...| 00000970 04 56 04 0d 04 60 12 dd 20 f2 6d 65 6e 75 5f 73 |.V...`.. .menu_s| 00000980 65 6c 65 63 74 0d 04 6a 0c e7 20 61 6c 74 25 20 |elect..j.. alt% | 00000990 8c 0d 04 74 2a 20 20 f4 20 43 68 65 63 6b 20 77 |...t* . Check w| 000009a0 68 69 63 68 20 6d 65 6e 75 20 49 20 61 6d 20 64 |hich menu I am d| 000009b0 65 61 6c 69 6e 67 20 77 69 74 68 0d 04 7e 10 20 |ealing with..~. | 000009c0 20 e7 20 21 71 25 3e 3d 30 20 8c 0d 04 88 42 20 | . !q%>=0 ....B | 000009d0 20 20 20 f2 69 63 6f 6e 5f 73 65 74 5f 74 65 78 | .icon_set_tex| 000009e0 74 28 6d 61 69 6e 25 2c 31 31 2c a4 73 74 72 69 |t(main%,11,.stri| 000009f0 6e 67 28 21 28 6d 65 6e 75 5f 62 6c 6f 63 6b 25 |ng(!(menu_block%| 00000a00 2b 34 30 2b 21 71 25 2a 32 34 29 29 29 0d 04 92 |+40+!q%*24)))...| 00000a10 2b 20 20 20 20 f4 20 53 65 74 20 6e 65 77 20 74 |+ . Set new t| 00000a20 61 73 6b 20 6e 61 6d 65 20 66 72 6f 6d 20 6d 65 |ask name from me| 00000a30 6e 75 20 62 6c 6f 63 6b 0d 04 9c 04 0d 04 a6 1b |nu block........| 00000a40 20 20 20 20 f2 63 61 72 65 74 5f 72 65 73 65 74 | .caret_reset| 00000a50 28 6d 61 69 6e 25 29 0d 04 b0 38 20 20 20 20 f4 |(main%)...8 .| 00000a60 20 4d 61 6b 65 20 73 75 72 65 20 74 68 65 20 63 | Make sure the c| 00000a70 61 72 65 74 20 69 73 20 6e 6f 77 20 69 6e 20 61 |aret is now in a| 00000a80 20 73 65 6e 73 69 62 6c 65 20 70 6c 61 63 65 0d | sensible place.| 00000a90 04 ba 07 20 20 cd 0d 04 c4 05 cc 0d 04 ce 17 20 |... .......... | 00000aa0 20 e7 20 21 71 25 3d 31 20 8c 20 65 78 69 74 25 | . !q%=1 . exit%| 00000ab0 3d b9 0d 04 d8 24 20 20 f4 20 51 75 69 74 20 6f |=....$ . Quit o| 00000ac0 70 74 69 6f 6e 20 6f 6e 20 69 63 6f 6e 20 62 61 |ption on icon ba| 00000ad0 72 20 6d 65 6e 75 0d 04 e2 05 cd 0d 04 ec 05 e1 |r menu..........| 00000ae0 0d 04 f6 04 0d 05 00 15 dd 20 f2 6d 65 73 73 61 |......... .messa| 00000af0 67 65 28 74 79 70 65 25 29 0d 05 0a 0e c8 8e 20 |ge(type%)...... | 00000b00 74 79 70 65 25 20 ca 0d 05 14 23 20 20 c9 20 30 |type% ....# . 0| 00000b10 20 3a 20 e7 20 61 6c 6c 6f 77 5f 71 75 69 74 25 | : . allow_quit%| 00000b20 20 8c 20 65 78 69 74 25 3d b9 0d 05 1e 21 20 20 | . exit%=....! | 00000b30 20 20 f4 20 49 74 20 77 61 73 20 6e 69 63 65 20 | . It was nice | 00000b40 6b 6e 6f 77 69 6e 67 20 79 6f 75 0d 05 28 04 0d |knowing you..(..| 00000b50 05 32 17 20 20 c9 20 26 35 30 32 20 3a 20 f2 64 |.2. . &502 : .d| 00000b60 6f 5f 68 65 6c 70 0d 05 3c 27 20 20 20 20 f4 20 |o_help..<' . | 00000b70 27 43 6f 73 20 49 27 6d 20 61 20 6e 69 63 65 20 |'Cos I'm a nice | 00000b80 68 65 6c 70 66 75 6c 20 63 68 61 70 21 0d 05 46 |helpful chap!..F| 00000b90 04 0d 05 50 3c 20 20 c9 20 26 34 30 30 43 32 20 |...P< . &400C2 | 00000ba0 3a 20 e7 20 61 6c 74 25 3d a3 20 8c 20 f2 63 68 |: . alt%=. . .ch| 00000bb0 65 63 6b 5f 74 61 73 6b 28 a4 73 74 72 69 6e 67 |eck_task(.string| 00000bc0 28 71 25 2b 32 38 29 2c 71 25 21 34 29 0d 05 5a |(q%+28),q%!4)..Z| 00000bd0 25 20 20 20 20 f4 20 43 68 65 63 6b 20 69 66 20 |% . Check if | 00000be0 6e 65 77 20 74 61 73 6b 20 69 73 20 6c 69 73 74 |new task is list| 00000bf0 65 64 0d 05 64 05 cb 0d 05 6e 05 e1 0d 05 78 04 |ed..d....n....x.| 00000c00 0d 05 82 11 dd 20 f2 69 6e 69 74 5f 73 65 74 75 |..... .init_setu| 00000c10 70 0d 05 8c 11 6d 61 78 5f 74 61 73 6b 73 25 3d |p....max_tasks%=| 00000c20 31 36 0d 05 96 53 de 20 74 61 73 6b 24 28 6d 61 |16...S. task$(ma| 00000c30 78 5f 74 61 73 6b 73 25 29 2c 71 75 69 74 25 28 |x_tasks%),quit%(| 00000c40 6d 61 78 5f 74 61 73 6b 73 25 29 2c 6d 65 73 73 |max_tasks%),mess| 00000c50 61 67 65 25 28 6d 61 78 5f 74 61 73 6b 73 25 29 |age%(max_tasks%)| 00000c60 2c 6d 65 73 73 61 67 65 24 28 6d 61 78 5f 74 61 |,message$(max_ta| 00000c70 73 6b 73 25 29 0d 05 a0 0f f2 6c 6f 61 64 5f 73 |sks%).....load_s| 00000c80 65 74 75 70 0d 05 aa 05 e1 0d 05 b4 04 0d 05 be |etup............| 00000c90 14 dd 20 f2 69 6e 69 74 5f 69 63 6f 6e 5f 62 61 |.. .init_icon_ba| 00000ca0 72 0d 05 c8 38 6d 79 5f 69 63 6f 6e 25 3d a4 69 |r...8my_icon%=.i| 00000cb0 63 6f 6e 5f 63 72 65 61 74 65 28 2d 32 2c 30 2c |con_create(-2,0,| 00000cc0 30 2c 36 38 2c 36 38 2c 26 32 30 30 32 2c 22 21 |0,68,68,&2002,"!| 00000cd0 6c 6f 6f 6b 6f 75 74 22 29 0d 05 d2 04 0d 05 dc |lookout").......| 00000ce0 23 62 61 72 5f 6d 65 6e 75 25 3d a4 73 74 61 72 |#bar_menu%=.star| 00000cf0 74 5f 6d 65 6e 75 28 6d 79 5f 6e 61 6d 65 24 29 |t_menu(my_name$)| 00000d00 0d 05 e6 26 f2 6d 65 6e 75 5f 69 74 65 6d 28 a4 |...&.menu_item(.| 00000d10 6d 65 73 73 61 67 65 28 22 4d 49 30 3a 22 29 2c |message("MI0:"),| 00000d20 69 6e 66 6f 25 29 0d 05 f0 22 f2 6d 65 6e 75 5f |info%)...".menu_| 00000d30 69 74 65 6d 28 a4 6d 65 73 73 61 67 65 28 22 4d |item(.message("M| 00000d40 49 31 3a 22 29 2c 30 29 0d 05 fa 0d f2 65 6e 64 |I1:"),0).....end| 00000d50 5f 6d 65 6e 75 0d 06 04 42 f4 20 43 72 65 61 74 |_menu...B. Creat| 00000d60 65 20 69 63 6f 6e 20 62 61 72 20 69 63 6f 6e 20 |e icon bar icon | 00000d70 69 66 20 73 65 74 20 75 70 20 61 6c 6c 6f 77 73 |if set up allows| 00000d80 20 69 74 20 61 6e 64 20 6e 6f 74 20 69 6e 20 61 | it and not in a| 00000d90 6c 74 20 6d 6f 64 65 0d 06 0e 04 0d 06 18 2c f2 |lt mode.......,.| 00000da0 6d 65 6e 75 5f 73 68 61 64 65 28 62 61 72 5f 6d |menu_shade(bar_m| 00000db0 65 6e 75 25 2c 31 2c 28 61 6c 6c 6f 77 5f 71 75 |enu%,1,(allow_qu| 00000dc0 69 74 25 3d a3 29 29 0d 06 22 29 f4 20 53 68 61 |it%=.)).."). Sha| 00000dd0 64 65 20 6f 75 74 20 71 75 69 74 20 6f 70 74 69 |de out quit opti| 00000de0 6f 6e 20 69 66 20 64 69 73 61 6c 6c 6f 77 65 64 |on if disallowed| 00000df0 0d 06 2c 05 e1 0d 06 36 04 0d 06 40 0f dd 20 f2 |..,....6...@.. .| 00000e00 69 6e 69 74 5f 61 6c 74 0d 06 4a 1e f4 20 73 65 |init_alt..J.. se| 00000e10 74 20 75 70 20 6f 70 74 69 6f 6e 73 20 69 6e 20 |t up options in | 00000e20 77 69 6e 64 6f 77 0d 06 54 24 f2 69 63 6f 6e 5f |window..T$.icon_| 00000e30 73 65 6c 65 63 74 28 6d 61 69 6e 25 2c 32 2c 73 |select(main%,2,s| 00000e40 68 6f 77 5f 69 63 6f 6e 25 29 0d 06 5e 25 f2 69 |how_icon%)..^%.i| 00000e50 63 6f 6e 5f 73 65 6c 65 63 74 28 6d 61 69 6e 25 |con_select(main%| 00000e60 2c 33 2c 61 6c 6c 6f 77 5f 71 75 69 74 25 29 0d |,3,allow_quit%).| 00000e70 06 68 29 f2 69 63 6f 6e 5f 73 65 6c 65 63 74 28 |.h).icon_select(| 00000e80 6d 61 69 6e 25 2c 34 2c 71 75 69 74 5f 77 68 65 |main%,4,quit_whe| 00000e90 6e 5f 64 6f 6e 65 25 29 0d 06 72 18 f2 77 69 6e |n_done%)..r..win| 00000ea0 64 6f 77 5f 70 6f 70 75 70 28 6d 61 69 6e 25 29 |dow_popup(main%)| 00000eb0 0d 06 7c 0b 6c 61 73 74 25 3d 30 0d 06 86 0b f2 |..|.last%=0.....| 00000ec0 73 65 74 28 31 29 0d 06 90 05 e1 0d 06 9a 04 0d |set(1)..........| 00000ed0 06 a4 16 dd 20 f2 63 68 65 63 6b 5f 61 6c 6c 5f |.... .check_all_| 00000ee0 74 61 73 6b 73 0d 06 ae 34 f4 20 63 68 65 63 6b |tasks...4. check| 00000ef0 20 65 78 69 73 74 69 6e 67 20 74 61 73 6b 73 20 | existing tasks | 00000f00 74 6f 20 73 65 65 20 69 66 20 74 68 65 79 20 61 |to see if they a| 00000f10 72 65 20 6c 69 73 74 65 64 0d 06 b8 0b 63 61 6c |re listed....cal| 00000f20 6c 25 3d 30 0d 06 c2 05 f5 0d 06 cc 38 20 20 c8 |l%=0........8 .| 00000f30 99 22 54 61 73 6b 4d 61 6e 61 67 65 72 5f 45 6e |."TaskManager_En| 00000f40 75 6d 65 72 61 74 65 54 61 73 6b 73 22 2c 63 61 |umerateTasks",ca| 00000f50 6c 6c 25 2c 71 25 2c 32 34 20 b8 20 63 61 6c 6c |ll%,q%,24 . call| 00000f60 25 0d 06 d6 30 20 20 e7 20 63 61 6c 6c 25 3e 30 |%...0 . call%>0| 00000f70 20 8c 20 f2 63 68 65 63 6b 5f 74 61 73 6b 28 a4 | . .check_task(.| 00000f80 73 74 72 69 6e 67 28 71 25 21 34 29 2c 21 71 25 |string(q%!4),!q%| 00000f90 29 0d 06 e0 0d fd 20 63 61 6c 6c 25 3c 30 0d 06 |)..... call%<0..| 00000fa0 ea 05 e1 0d 06 f4 04 0d 06 fe 11 dd 20 f2 6c 6f |............ .lo| 00000fb0 61 64 5f 73 65 74 75 70 0d 07 08 20 73 65 74 75 |ad_setup... setu| 00000fc0 70 5f 66 69 6c 65 24 3d 6d 79 5f 64 69 72 24 2b |p_file$=my_dir$+| 00000fd0 22 2e 53 65 74 55 70 22 0d 07 12 2d c8 99 22 58 |".SetUp"...-.."X| 00000fe0 4f 53 5f 46 69 6e 64 22 2c 36 34 2c 73 65 74 75 |OS_Find",64,setu| 00000ff0 70 5f 66 69 6c 65 24 20 b8 20 68 61 6e 64 6c 65 |p_file$ . handle| 00001000 25 3b 6f 6b 25 0d 07 1c 1f 6f 6b 25 3d 28 28 6f |%;ok%....ok%=((o| 00001010 6b 25 80 31 29 3d 30 29 80 28 68 61 6e 64 6c 65 |k%.1)=0).(handle| 00001020 25 3e 30 29 0d 07 26 23 f4 20 43 68 65 63 6b 20 |%>0)..&#. Check | 00001030 74 6f 20 73 65 65 20 69 66 20 66 69 6c 65 20 69 |to see if file i| 00001040 73 20 74 68 65 72 65 0d 07 30 0b e7 20 6f 6b 25 |s there..0.. ok%| 00001050 20 8c 0d 07 3a 30 20 20 f4 20 49 66 20 69 74 20 | ...:0 . If it | 00001060 69 73 20 74 68 65 6e 20 6c 6f 61 64 20 64 61 74 |is then load dat| 00001070 61 20 65 6c 73 65 20 73 65 74 20 64 65 66 61 75 |a else set defau| 00001080 6c 74 0d 07 44 04 0d 07 4e 1a 20 20 e8 23 68 61 |lt..D...N. .#ha| 00001090 6e 64 6c 65 25 2c 73 68 6f 77 5f 69 63 6f 6e 25 |ndle%,show_icon%| 000010a0 0d 07 58 1b 20 20 e8 23 68 61 6e 64 6c 65 25 2c |..X. .#handle%,| 000010b0 61 6c 6c 6f 77 5f 71 75 69 74 25 0d 07 62 1f 20 |allow_quit%..b. | 000010c0 20 e8 23 68 61 6e 64 6c 65 25 2c 71 75 69 74 5f | .#handle%,quit_| 000010d0 77 68 65 6e 5f 64 6f 6e 65 25 0d 07 6c 0d 20 20 |when_done%..l. | 000010e0 74 61 73 6b 25 3d 31 0d 07 76 13 20 20 c8 95 20 |task%=1..v. .. | 000010f0 ac c5 23 68 61 6e 64 6c 65 25 0d 07 80 1e 20 20 |..#handle%.... | 00001100 20 20 e8 23 68 61 6e 64 6c 65 25 2c 74 61 73 6b | .#handle%,task| 00001110 24 28 74 61 73 6b 25 29 0d 07 8a 1e 20 20 20 20 |$(task%).... | 00001120 e8 23 68 61 6e 64 6c 65 25 2c 71 75 69 74 25 28 |.#handle%,quit%(| 00001130 74 61 73 6b 25 29 0d 07 94 21 20 20 20 20 e8 23 |task%)...! .#| 00001140 68 61 6e 64 6c 65 25 2c 6d 65 73 73 61 67 65 25 |handle%,message%| 00001150 28 74 61 73 6b 25 29 0d 07 9e 21 20 20 20 20 e8 |(task%)...! .| 00001160 23 68 61 6e 64 6c 65 25 2c 6d 65 73 73 61 67 65 |#handle%,message| 00001170 24 28 74 61 73 6b 25 29 0d 07 a8 10 20 20 20 20 |$(task%).... | 00001180 74 61 73 6b 25 2b 3d 31 0d 07 b2 07 20 20 ce 0d |task%+=1.... ..| 00001190 07 bc 0f 20 20 d9 23 68 61 6e 64 6c 65 25 0d 07 |... .#handle%..| 000011a0 c6 05 cc 0d 07 d0 28 20 20 73 68 6f 77 5f 69 63 |......( show_ic| 000011b0 6f 6e 25 3d a4 69 63 6f 6e 5f 73 65 6c 65 63 74 |on%=.icon_select| 000011c0 65 64 28 6d 61 69 6e 25 2c 32 29 0d 07 da 29 20 |ed(main%,2)...) | 000011d0 20 61 6c 6c 6f 77 5f 71 75 69 74 25 3d a4 69 63 | allow_quit%=.ic| 000011e0 6f 6e 5f 73 65 6c 65 63 74 65 64 28 6d 61 69 6e |on_selected(main| 000011f0 25 2c 33 29 0d 07 e4 2d 20 20 71 75 69 74 5f 77 |%,3)...- quit_w| 00001200 68 65 6e 5f 64 6f 6e 65 25 3d a4 69 63 6f 6e 5f |hen_done%=.icon_| 00001210 73 65 6c 65 63 74 65 64 28 6d 61 69 6e 25 2c 34 |selected(main%,4| 00001220 29 0d 07 ee 05 cd 0d 07 f8 05 e1 0d 08 02 04 0d |)...............| 00001230 08 0c 11 dd 20 f2 73 61 76 65 5f 73 65 74 75 70 |.... .save_setup| 00001240 0d 08 16 1a 68 61 6e 64 6c 65 25 3d ae 28 73 65 |....handle%=.(se| 00001250 74 75 70 5f 66 69 6c 65 24 29 0d 08 20 18 f1 23 |tup_file$).. ..#| 00001260 68 61 6e 64 6c 65 25 2c 73 68 6f 77 5f 69 63 6f |handle%,show_ico| 00001270 6e 25 0d 08 2a 19 f1 23 68 61 6e 64 6c 65 25 2c |n%..*..#handle%,| 00001280 61 6c 6c 6f 77 5f 71 75 69 74 25 0d 08 34 1d f1 |allow_quit%..4..| 00001290 23 68 61 6e 64 6c 65 25 2c 71 75 69 74 5f 77 68 |#handle%,quit_wh| 000012a0 65 6e 5f 64 6f 6e 65 25 0d 08 3e 1a e3 20 74 61 |en_done%..>.. ta| 000012b0 73 6b 25 3d 31 20 b8 20 6d 61 78 5f 74 61 73 6b |sk%=1 . max_task| 000012c0 73 25 0d 08 48 1a 20 20 e7 20 74 61 73 6b 24 28 |s%..H. . task$(| 000012d0 74 61 73 6b 25 29 3c 3e 22 22 20 8c 0d 08 52 1e |task%)<>"" ...R.| 000012e0 20 20 20 20 f1 23 68 61 6e 64 6c 65 25 2c 74 61 | .#handle%,ta| 000012f0 73 6b 24 28 74 61 73 6b 25 29 0d 08 5c 1e 20 20 |sk$(task%)..\. | 00001300 20 20 f1 23 68 61 6e 64 6c 65 25 2c 71 75 69 74 | .#handle%,quit| 00001310 25 28 74 61 73 6b 25 29 0d 08 66 21 20 20 20 20 |%(task%)..f! | 00001320 f1 23 68 61 6e 64 6c 65 25 2c 6d 65 73 73 61 67 |.#handle%,messag| 00001330 65 25 28 74 61 73 6b 25 29 0d 08 70 21 20 20 20 |e%(task%)..p! | 00001340 20 f1 23 68 61 6e 64 6c 65 25 2c 6d 65 73 73 61 | .#handle%,messa| 00001350 67 65 24 28 74 61 73 6b 25 29 0d 08 7a 07 20 20 |ge$(task%)..z. | 00001360 cd 0d 08 84 0b ed 20 74 61 73 6b 25 0d 08 8e 0d |...... task%....| 00001370 d9 23 68 61 6e 64 6c 65 25 0d 08 98 05 e1 0d 08 |.#handle%.......| 00001380 a2 04 0d 08 ac 10 dd 20 f2 73 65 74 28 6e 65 77 |....... .set(new| 00001390 25 29 0d 08 b6 28 f4 20 53 65 74 20 6f 70 74 69 |%)...(. Set opti| 000013a0 6f 6e 73 2c 20 65 74 63 2e 20 69 6e 20 73 65 74 |ons, etc. in set| 000013b0 20 75 70 20 77 69 6e 64 6f 77 0d 08 c0 12 e7 20 | up window..... | 000013c0 6c 61 73 74 25 20 8c 20 f2 67 65 74 0d 08 ca 28 |last% . .get...(| 000013d0 f2 69 63 6f 6e 5f 73 65 74 5f 74 65 78 74 28 6d |.icon_set_text(m| 000013e0 61 69 6e 25 2c 31 31 2c 74 61 73 6b 24 28 6e 65 |ain%,11,task$(ne| 000013f0 77 25 29 29 0d 08 d4 26 f2 69 63 6f 6e 5f 73 65 |w%))...&.icon_se| 00001400 6c 65 63 74 28 6d 61 69 6e 25 2c 31 34 2c 71 75 |lect(main%,14,qu| 00001410 69 74 25 28 6e 65 77 25 29 29 0d 08 de 29 f2 69 |it%(new%))...).i| 00001420 63 6f 6e 5f 73 65 6c 65 63 74 28 6d 61 69 6e 25 |con_select(main%| 00001430 2c 31 35 2c 6d 65 73 73 61 67 65 25 28 6e 65 77 |,15,message%(new| 00001440 25 29 29 0d 08 e8 2b f2 69 63 6f 6e 5f 73 65 74 |%))...+.icon_set| 00001450 5f 74 65 78 74 28 6d 61 69 6e 25 2c 31 36 2c 6d |_text(main%,16,m| 00001460 65 73 73 61 67 65 24 28 6e 65 77 25 29 29 0d 08 |essage$(new%))..| 00001470 f2 23 f2 69 63 6f 6e 5f 73 65 74 5f 74 65 78 74 |.#.icon_set_text| 00001480 28 6d 61 69 6e 25 2c 37 2c c3 28 6e 65 77 25 29 |(main%,7,.(new%)| 00001490 29 0d 08 fc 17 f2 63 61 72 65 74 5f 72 65 73 65 |).....caret_rese| 000014a0 74 28 6d 61 69 6e 25 29 0d 09 06 0e 6c 61 73 74 |t(main%)....last| 000014b0 25 3d 6e 65 77 25 0d 09 10 05 e1 0d 09 1a 04 0d |%=new%..........| 000014c0 09 24 0a dd 20 f2 67 65 74 0d 09 2e 35 f4 20 47 |.$.. .get...5. G| 000014d0 65 74 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 |et options that | 000014e0 68 61 76 65 20 62 65 65 6e 20 73 65 74 20 69 6e |have been set in| 000014f0 20 73 65 74 20 75 70 20 77 69 6e 64 6f 77 0d 09 | set up window..| 00001500 38 26 73 68 6f 77 5f 69 63 6f 6e 25 3d a4 69 63 |8&show_icon%=.ic| 00001510 6f 6e 5f 73 65 6c 65 63 74 65 64 28 6d 61 69 6e |on_selected(main| 00001520 25 2c 32 29 0d 09 42 27 61 6c 6c 6f 77 5f 71 75 |%,2)..B'allow_qu| 00001530 69 74 25 3d a4 69 63 6f 6e 5f 73 65 6c 65 63 74 |it%=.icon_select| 00001540 65 64 28 6d 61 69 6e 25 2c 33 29 0d 09 4c 2b 71 |ed(main%,3)..L+q| 00001550 75 69 74 5f 77 68 65 6e 5f 64 6f 6e 65 25 3d a4 |uit_when_done%=.| 00001560 69 63 6f 6e 5f 73 65 6c 65 63 74 65 64 28 6d 61 |icon_selected(ma| 00001570 69 6e 25 2c 34 29 0d 09 56 38 74 61 73 6b 24 28 |in%,4)..V8task$(| 00001580 6c 61 73 74 25 29 3d a4 73 74 72 69 70 5f 65 6e |last%)=.strip_en| 00001590 64 5f 73 70 61 63 65 73 28 a4 69 63 6f 6e 5f 74 |d_spaces(.icon_t| 000015a0 65 78 74 28 6d 61 69 6e 25 2c 31 31 29 29 0d 09 |ext(main%,11))..| 000015b0 60 29 71 75 69 74 25 28 6c 61 73 74 25 29 3d a4 |`)quit%(last%)=.| 000015c0 69 63 6f 6e 5f 73 65 6c 65 63 74 65 64 28 6d 61 |icon_selected(ma| 000015d0 69 6e 25 2c 31 34 29 0d 09 6a 2c 6d 65 73 73 61 |in%,14)..j,messa| 000015e0 67 65 25 28 6c 61 73 74 25 29 3d a4 69 63 6f 6e |ge%(last%)=.icon| 000015f0 5f 73 65 6c 65 63 74 65 64 28 6d 61 69 6e 25 2c |_selected(main%,| 00001600 31 35 29 0d 09 74 3b 6d 65 73 73 61 67 65 24 28 |15)..t;message$(| 00001610 6c 61 73 74 25 29 3d a4 73 74 72 69 70 5f 65 6e |last%)=.strip_en| 00001620 64 5f 73 70 61 63 65 73 28 a4 69 63 6f 6e 5f 74 |d_spaces(.icon_t| 00001630 65 78 74 28 6d 61 69 6e 25 2c 31 36 29 29 0d 09 |ext(main%,16))..| 00001640 7e 05 e1 0d 09 88 04 0d 09 92 15 dd 20 f2 6f 70 |~........... .op| 00001650 65 6e 5f 74 61 73 6b 5f 6d 65 6e 75 0d 09 9c 13 |en_task_menu....| 00001660 62 6c 6f 63 6b 5f 69 6e 64 25 3d 69 6e 64 25 0d |block_ind%=ind%.| 00001670 09 a6 1f 62 6c 6f 63 6b 25 3d a4 73 74 61 72 74 |...block%=.start| 00001680 5f 6d 65 6e 75 28 22 54 61 73 6b 73 22 29 0d 09 |_menu("Tasks")..| 00001690 b0 0b 63 61 6c 6c 25 3d 30 0d 09 ba 05 f5 0d 09 |..call%=0.......| 000016a0 c4 38 20 20 c8 99 22 54 61 73 6b 4d 61 6e 61 67 |.8 .."TaskManag| 000016b0 65 72 5f 45 6e 75 6d 65 72 61 74 65 54 61 73 6b |er_EnumerateTask| 000016c0 73 22 2c 63 61 6c 6c 25 2c 71 25 2c 32 34 20 b8 |s",call%,q%,24 .| 000016d0 20 63 61 6c 6c 25 0d 09 ce 11 20 20 e7 20 63 61 | call%.... . ca| 000016e0 6c 6c 25 3e 30 20 8c 0d 09 d8 21 20 20 20 20 24 |ll%>0 ....! $| 000016f0 62 6c 6f 63 6b 5f 69 6e 64 25 3d a4 73 74 72 69 |block_ind%=.stri| 00001700 6e 67 28 71 25 21 34 29 0d 09 e2 34 20 20 20 20 |ng(q%!4)...4 | 00001710 f2 6d 65 6e 75 5f 69 6e 64 5f 69 74 65 6d 28 62 |.menu_ind_item(b| 00001720 6c 6f 63 6b 5f 69 6e 64 25 2c 2d 31 2c a9 24 62 |lock_ind%,-1,.$b| 00001730 6c 6f 63 6b 5f 69 6e 64 25 2b 31 29 0d 09 ec 29 |lock_ind%+1)...)| 00001740 20 20 20 20 f4 20 41 64 64 20 65 61 63 68 20 74 | . Add each t| 00001750 61 73 6b 20 66 6f 75 6e 64 20 74 6f 20 74 68 65 |ask found to the| 00001760 20 6d 65 6e 75 0d 09 f6 04 0d 0a 00 22 20 20 20 | menu......." | 00001770 20 62 6c 6f 63 6b 5f 69 6e 64 25 2b 3d a9 24 62 | block_ind%+=.$b| 00001780 6c 6f 63 6b 5f 69 6e 64 25 2b 31 0d 0a 0a 07 20 |lock_ind%+1.... | 00001790 20 cd 0d 0a 14 0d fd 20 63 61 6c 6c 25 3c 30 0d | ...... call%<0.| 000017a0 0a 1e 0d f2 65 6e 64 5f 6d 65 6e 75 0d 0a 28 16 |....end_menu..(.| 000017b0 6d 65 6e 75 5f 62 6c 6f 63 6b 25 3d 62 6c 6f 63 |menu_block%=bloc| 000017c0 6b 25 0d 0a 32 04 0d 0a 3c 18 f2 69 63 6f 6e 5f |k%..2...<..icon_| 000017d0 69 6e 66 6f 28 6d 61 69 6e 25 2c 31 33 29 0d 0a |info(main%,13)..| 000017e0 46 2f f2 6f 70 65 6e 5f 6d 65 6e 75 28 6d 65 6e |F/.open_menu(men| 000017f0 75 5f 62 6c 6f 63 6b 25 2c 71 25 21 31 36 2b 77 |u_block%,q%!16+w| 00001800 78 25 2c 71 25 21 32 30 2b 77 79 25 29 0d 0a 50 |x%,q%!20+wy%)..P| 00001810 05 e1 0d 0a 5a 04 0d 0a 64 20 dd 20 f2 63 68 65 |....Z...d . .che| 00001820 63 6b 5f 74 61 73 6b 28 6e 61 6d 65 24 2c 68 61 |ck_task(name$,ha| 00001830 6e 64 6c 65 25 29 0d 0a 6e 08 ea 20 61 25 0d 0a |ndle%)..n.. a%..| 00001840 78 28 f4 20 43 68 65 63 6b 20 74 61 73 6b 20 61 |x(. Check task a| 00001850 67 61 69 6e 73 74 20 74 68 65 20 77 61 6e 74 65 |gainst the wante| 00001860 64 20 6c 69 73 74 0d 0a 82 12 e3 20 74 61 73 6b |d list..... task| 00001870 25 3d 31 20 b8 20 31 36 0d 0a 8c 44 20 20 e7 20 |%=1 . 16...D . | 00001880 a4 63 61 70 73 28 74 61 73 6b 24 28 74 61 73 6b |.caps(task$(task| 00001890 25 29 29 3d a4 63 61 70 73 28 6e 61 6d 65 24 29 |%))=.caps(name$)| 000018a0 20 8c 20 f2 64 6f 5f 61 63 74 69 6f 6e 28 74 61 | . .do_action(ta| 000018b0 73 6b 25 2c 68 61 6e 64 6c 65 25 29 0d 0a 96 0b |sk%,handle%)....| 000018c0 ed 20 74 61 73 6b 25 0d 0a a0 05 e1 0d 0a aa 04 |. task%.........| 000018d0 0d 0a b4 1f dd 20 f2 64 6f 5f 61 63 74 69 6f 6e |..... .do_action| 000018e0 28 74 61 73 6b 25 2c 68 61 6e 64 6c 65 25 29 0d |(task%,handle%).| 000018f0 0a be 40 f4 20 44 6f 20 77 68 61 74 65 76 65 72 |..@. Do whatever| 00001900 20 68 61 73 20 74 6f 20 62 65 20 64 6f 6e 65 2c | has to be done,| 00001910 20 69 74 27 73 20 66 6f 72 20 69 74 73 20 6f 77 | it's for its ow| 00001920 6e 20 67 6f 6f 64 20 79 6f 75 20 6b 6e 6f 77 0d |n good you know.| 00001930 0a c8 0d ea 20 72 65 70 6f 72 74 24 0d 0a d2 17 |.... report$....| 00001940 e7 20 6d 65 73 73 61 67 65 25 28 74 61 73 6b 25 |. message%(task%| 00001950 29 20 8c 0d 0a dc 1c 20 20 e7 20 6d 65 73 73 61 |) ..... . messa| 00001960 67 65 24 28 74 61 73 6b 25 29 3d 22 22 20 8c 0d |ge$(task%)="" ..| 00001970 0a e6 37 20 20 20 20 f4 20 49 66 20 74 68 65 72 |..7 . If ther| 00001980 65 20 69 73 20 6e 6f 20 6d 65 73 73 61 67 65 20 |e is no message | 00001990 74 68 65 6e 20 6d 61 6b 65 20 73 6f 6d 65 74 68 |then make someth| 000019a0 69 6e 67 20 75 70 0d 0a f0 2d 20 20 20 20 72 65 |ing up...- re| 000019b0 70 6f 72 74 24 3d a4 6d 65 73 73 61 67 65 30 28 |port$=.message0(| 000019c0 22 54 4d 30 22 2c 74 61 73 6b 24 28 74 61 73 6b |"TM0",task$(task| 000019d0 25 29 29 0d 0a fa 31 20 20 20 20 e7 20 71 75 69 |%))...1 . qui| 000019e0 74 25 28 74 61 73 6b 25 29 20 8c 20 72 65 70 6f |t%(task%) . repo| 000019f0 72 74 24 2b 3d a4 6d 65 73 73 61 67 65 28 22 54 |rt$+=.message("T| 00001a00 4d 31 22 29 0d 0b 04 07 20 20 cc 0d 0b 0e 1f 20 |M1").... ..... | 00001a10 20 20 20 72 65 70 6f 72 74 24 3d 6d 65 73 73 61 | report$=messa| 00001a20 67 65 24 28 74 61 73 6b 25 29 0d 0b 18 07 20 20 |ge$(task%).... | 00001a30 cd 0d 0b 22 1c 20 20 f2 72 65 70 6f 72 74 5f 65 |...". .report_e| 00001a40 72 72 6f 72 28 72 65 70 6f 72 74 24 29 0d 0b 2c |rror(report$)..,| 00001a50 05 cd 0d 0b 36 04 0d 0b 40 14 e7 20 71 75 69 74 |....6...@.. quit| 00001a60 25 28 74 61 73 6b 25 29 20 8c 0d 0b 4a 34 20 20 |%(task%) ...J4 | 00001a70 f4 20 4b 69 6c 6c 20 74 68 65 20 74 61 73 6b 20 |. Kill the task | 00001a80 69 66 20 74 68 65 20 77 61 72 72 61 6e 74 20 68 |if the warrant h| 00001a90 61 73 20 62 65 65 6e 20 73 69 67 6e 65 64 0d 0b |as been signed..| 00001aa0 54 0c 20 20 21 71 25 3d 32 30 0d 0b 5e 0d 20 20 |T. !q%=20..^. | 00001ab0 71 25 21 31 36 3d 30 0d 0b 68 28 20 20 c8 99 22 |q%!16=0..h( .."| 00001ac0 57 69 6d 70 5f 53 65 6e 64 4d 65 73 73 61 67 65 |Wimp_SendMessage| 00001ad0 22 2c 31 37 2c 71 25 2c 68 61 6e 64 6c 65 25 0d |",17,q%,handle%.| 00001ae0 0b 72 05 cd 0d 0b 7c 04 0d 0b 86 1f e7 20 71 75 |.r....|...... qu| 00001af0 69 74 5f 77 68 65 6e 5f 64 6f 6e 65 25 20 8c 20 |it_when_done% . | 00001b00 65 78 69 74 25 3d b9 0d 0b 90 2e f4 20 43 6f 6d |exit%=...... Com| 00001b10 6d 69 74 20 73 75 69 63 69 64 65 20 69 66 20 74 |mit suicide if t| 00001b20 68 65 20 63 72 69 6d 65 20 77 61 73 20 74 6f 6f |he crime was too| 00001b30 20 6d 75 63 68 0d 0b 9a 04 0d 0b a4 05 e1 0d 0b | much...........| 00001b40 ae 04 0d 0b b8 0e dd 20 f2 64 6f 5f 68 65 6c 70 |....... .do_help| 00001b50 0d 0b c2 10 68 65 6c 70 5f 61 6c 74 24 3d 22 22 |....help_alt$=""| 00001b60 0d 0b cc 0e c8 8e 20 71 25 21 33 32 20 ca 0d 0b |...... q%!32 ...| 00001b70 d6 22 20 20 c9 20 69 6e 66 6f 25 20 3a 20 68 65 |." . info% : he| 00001b80 6c 70 5f 74 6f 6b 65 6e 24 3d 22 69 6e 66 6f 22 |lp_token$="info"| 00001b90 0d 0b e0 0d 20 20 c9 20 6d 61 69 6e 25 0d 0b ea |.... . main%...| 00001ba0 19 20 20 20 20 68 65 6c 70 5f 61 6c 74 24 3d 22 |. help_alt$="| 00001bb0 73 65 74 75 70 22 0d 0b f4 26 20 20 20 20 68 65 |setup"...& he| 00001bc0 6c 70 5f 74 6f 6b 65 6e 24 3d 68 65 6c 70 5f 61 |lp_token$=help_a| 00001bd0 6c 74 24 2b c3 28 71 25 21 33 36 29 0d 0b fe 1d |lt$+.(q%!36)....| 00001be0 20 20 c9 20 2d 32 20 3a 20 68 65 6c 70 5f 74 6f | . -2 : help_to| 00001bf0 6b 65 6e 24 3d 22 49 42 22 0d 0c 08 05 7f 0d 0c |ken$="IB".......| 00001c00 12 0e 20 20 e7 20 61 6c 74 25 20 8c 0d 0c 1c 18 |.. . alt% .....| 00001c10 20 20 20 20 68 65 6c 70 5f 74 6f 6b 65 6e 24 3d | help_token$=| 00001c20 22 54 4d 22 0d 0c 26 07 20 20 cc 0d 0c 30 31 20 |"TM"..&. ...01 | 00001c30 20 20 20 c8 99 22 57 69 6d 70 5f 47 65 74 4d 65 | .."Wimp_GetMe| 00001c40 6e 75 53 74 61 74 65 22 2c 31 2c 71 25 2b 34 30 |nuState",1,q%+40| 00001c50 2c 71 25 21 33 32 2c 71 25 21 33 36 0d 0c 3a 21 |,q%!32,q%!36..:!| 00001c60 20 20 20 20 68 65 6c 70 5f 74 6f 6b 65 6e 24 3d | help_token$=| 00001c70 22 49 4d 22 2b c3 28 71 25 21 34 30 29 0d 0c 44 |"IM"+.(q%!40)..D| 00001c80 07 20 20 cd 0d 0c 4e 05 cb 0d 0c 58 2e 68 65 6c |. ...N....X.hel| 00001c90 70 5f 73 74 72 69 6e 67 24 3d a4 6d 65 73 73 61 |p_string$=.messa| 00001ca0 67 65 28 22 68 65 6c 70 5f 22 2b 68 65 6c 70 5f |ge("help_"+help_| 00001cb0 74 6f 6b 65 6e 24 29 0d 0c 62 40 e7 20 68 65 6c |token$)..b@. hel| 00001cc0 70 5f 73 74 72 69 6e 67 24 3d 22 22 20 8c 20 68 |p_string$="" . h| 00001cd0 65 6c 70 5f 73 74 72 69 6e 67 24 3d a4 6d 65 73 |elp_string$=.mes| 00001ce0 73 61 67 65 28 22 68 65 6c 70 5f 22 2b 68 65 6c |sage("help_"+hel| 00001cf0 70 5f 61 6c 74 24 29 0d 0c 6c 0e 71 25 21 31 32 |p_alt$)..l.q%!12| 00001d00 3d 71 25 21 38 0d 0c 76 0e 71 25 21 31 36 3d 26 |=q%!8..v.q%!16=&| 00001d10 35 30 33 0d 0c 80 1c 24 28 71 25 2b 32 30 29 3d |503....$(q%+20)=| 00001d20 68 65 6c 70 5f 73 74 72 69 6e 67 24 2b bd 30 0d |help_string$+.0.| 00001d30 0c 8a 1d 21 71 25 3d 28 32 34 2b a9 68 65 6c 70 |...!q%=(24+.help| 00001d40 5f 73 74 72 69 6e 67 24 29 80 ac 33 0d 0c 94 23 |_string$)..3...#| 00001d50 c8 99 22 57 69 6d 70 5f 53 65 6e 64 4d 65 73 73 |.."Wimp_SendMess| 00001d60 61 67 65 22 2c 31 37 2c 71 25 2c 71 25 21 34 0d |age",17,q%,q%!4.| 00001d70 0c 9e 05 e1 0d 0c a8 04 0d 0c b2 3c dd 20 a4 69 |...........<. .i| 00001d80 63 6f 6e 5f 63 72 65 61 74 65 28 21 71 25 2c 71 |con_create(!q%,q| 00001d90 25 21 34 2c 71 25 21 38 2c 71 25 21 31 32 2c 71 |%!4,q%!8,q%!12,q| 00001da0 25 21 31 36 2c 71 25 21 32 30 2c 24 28 71 25 2b |%!16,q%!20,$(q%+| 00001db0 32 34 29 29 0d 0c bc 0b ea 20 69 63 6f 6e 25 0d |24))..... icon%.| 00001dc0 0c c6 23 c8 99 22 57 69 6d 70 5f 43 72 65 61 74 |..#.."Wimp_Creat| 00001dd0 65 49 63 6f 6e 22 2c 2c 71 25 20 b8 20 69 63 6f |eIcon",,q% . ico| 00001de0 6e 25 0d 0c d0 0a 3d 69 63 6f 6e 25 0d 0c da 04 |n%....=icon%....| 00001df0 0d 0c e4 1a dd 20 f2 69 63 6f 6e 5f 69 6e 66 6f |..... .icon_info| 00001e00 28 21 71 25 2c 71 25 21 34 29 0d 0c ee 1d c8 99 |(!q%,q%!4)......| 00001e10 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 |"Wimp_GetIconSta| 00001e20 74 65 22 2c 2c 71 25 0d 0c f8 05 e1 0d 0d 02 04 |te",,q%.........| 00001e30 0d 0d 0c 24 dd 20 f2 69 63 6f 6e 5f 73 65 6c 65 |...$. .icon_sele| 00001e40 63 74 28 21 71 25 2c 71 25 21 34 2c 73 65 6c 65 |ct(!q%,q%!4,sele| 00001e50 63 74 25 29 0d 0d 16 1d c8 99 22 57 69 6d 70 5f |ct%)......"Wimp_| 00001e60 47 65 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 71 |GetIconState",,q| 00001e70 25 0d 0d 20 23 e7 20 73 65 6c 65 63 74 25 20 8c |%.. #. select% .| 00001e80 20 71 25 21 38 3d 31 3c 3c 32 31 20 8b 20 71 25 | q%!8=1<<21 . q%| 00001e90 21 38 3d 30 0d 0d 2a 0f 71 25 21 31 32 3d 31 3c |!8=0..*.q%!12=1<| 00001ea0 3c 32 31 0d 0d 34 37 e7 20 28 71 25 21 32 34 20 |<21..47. (q%!24 | 00001eb0 80 20 71 25 21 31 32 29 3c 3e 71 25 21 38 20 8c |. q%!12)<>q%!8 .| 00001ec0 20 c8 99 22 57 69 6d 70 5f 53 65 74 49 63 6f 6e | .."Wimp_SetIcon| 00001ed0 53 74 61 74 65 22 2c 2c 71 25 0d 0d 3e 05 e1 0d |State",,q%..>...| 00001ee0 0d 48 04 0d 0d 52 1e dd 20 a4 69 63 6f 6e 5f 73 |.H...R.. .icon_s| 00001ef0 65 6c 65 63 74 65 64 28 21 71 25 2c 71 25 21 34 |elected(!q%,q%!4| 00001f00 29 0d 0d 5c 1d c8 99 22 57 69 6d 70 5f 47 65 74 |)..\..."Wimp_Get| 00001f10 49 63 6f 6e 53 74 61 74 65 22 2c 2c 71 25 0d 0d |IconState",,q%..| 00001f20 66 1a 3d 28 28 28 71 25 21 32 34 29 80 28 31 3c |f.=(((q%!24).(1<| 00001f30 3c 32 31 29 29 3e 30 29 0d 0d 70 04 0d 0d 7a 24 |<21))>0)..p...z$| 00001f40 dd 20 f2 69 63 6f 6e 5f 73 65 74 5f 74 65 78 74 |. .icon_set_text| 00001f50 28 21 71 25 2c 71 25 21 34 2c 74 65 78 74 24 29 |(!q%,q%!4,text$)| 00001f60 0d 0d 84 1d c8 99 22 57 69 6d 70 5f 47 65 74 49 |......"Wimp_GetI| 00001f70 63 6f 6e 53 74 61 74 65 22 2c 2c 71 25 0d 0d 8e |conState",,q%...| 00001f80 19 74 65 78 74 24 3d c0 74 65 78 74 24 2c 71 25 |.text$=.text$,q%| 00001f90 21 33 36 2d 31 29 0d 0d 98 17 e7 20 24 28 71 25 |!36-1)..... $(q%| 00001fa0 21 32 38 29 3c 3e 74 65 78 74 24 20 8c 0d 0d a2 |!28)<>text$ ....| 00001fb0 12 24 28 71 25 21 32 38 29 3d 74 65 78 74 24 0d |.$(q%!28)=text$.| 00001fc0 0d ac 0a 71 25 21 38 3d 30 0d 0d b6 0b 71 25 21 |...q%!8=0....q%!| 00001fd0 31 32 3d 30 0d 0d c0 1d c8 99 22 57 69 6d 70 5f |12=0......"Wimp_| 00001fe0 53 65 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 71 |SetIconState",,q| 00001ff0 25 0d 0d ca 05 cd 0d 0d d4 05 e1 0d 0d de 04 0d |%...............| 00002000 0d e8 1a dd 20 a4 69 63 6f 6e 5f 74 65 78 74 28 |.... .icon_text(| 00002010 21 71 25 2c 71 25 21 34 29 0d 0d f2 1d c8 99 22 |!q%,q%!4)......"| 00002020 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 74 |Wimp_GetIconStat| 00002030 65 22 2c 2c 71 25 0d 0d fc 0d 3d 24 28 71 25 21 |e",,q%....=$(q%!| 00002040 32 38 29 0d 0e 06 04 0d 0e 10 26 dd 20 f2 63 61 |28).......&. .ca| 00002050 72 65 74 5f 70 6c 61 63 65 28 77 69 6e 64 25 2c |ret_place(wind%,| 00002060 69 63 6f 6e 25 2c 69 6e 64 65 78 25 29 0d 0e 1a |icon%,index%)...| 00002070 0a ea 20 6c 65 6e 25 0d 0e 24 23 6c 65 6e 25 3d |.. len%..$#len%=| 00002080 a9 28 a4 69 63 6f 6e 5f 74 65 78 74 28 77 69 6e |.(.icon_text(win| 00002090 64 25 2c 69 63 6f 6e 25 29 29 0d 0e 2e 1f e7 20 |d%,icon%))..... | 000020a0 69 6e 64 65 78 25 3e 6c 65 6e 25 20 8c 20 69 6e |index%>len% . in| 000020b0 64 65 78 25 3d 6c 65 6e 25 0d 0e 38 35 c8 99 22 |dex%=len%..85.."| 000020c0 57 69 6d 70 5f 53 65 74 43 61 72 65 74 50 6f 73 |Wimp_SetCaretPos| 000020d0 69 74 69 6f 6e 22 2c 77 69 6e 64 25 2c 69 63 6f |ition",wind%,ico| 000020e0 6e 25 2c 2c 2c 2d 31 2c 69 6e 64 65 78 25 0d 0e |n%,,,-1,index%..| 000020f0 42 05 e1 0d 0e 4c 04 0d 0e 56 19 dd 20 f2 63 61 |B....L...V.. .ca| 00002100 72 65 74 5f 72 65 73 65 74 28 77 69 6e 64 25 29 |ret_reset(wind%)| 00002110 0d 0e 60 21 c8 99 22 57 69 6d 70 5f 47 65 74 43 |..`!.."Wimp_GetC| 00002120 61 72 65 74 50 6f 73 69 74 69 6f 6e 22 2c 2c 71 |aretPosition",,q| 00002130 25 0d 0e 6a 30 e7 20 21 71 25 3d 77 69 6e 64 25 |%..j0. !q%=wind%| 00002140 20 8c 20 f2 63 61 72 65 74 5f 70 6c 61 63 65 28 | . .caret_place(| 00002150 77 69 6e 64 25 2c 71 25 21 34 2c 71 25 21 32 30 |wind%,q%!4,q%!20| 00002160 29 0d 0e 74 05 e1 0d 0e 7e 04 0d 0e 88 1c dd 20 |)..t....~...... | 00002170 a4 6c 6f 61 64 5f 74 65 6d 70 6c 61 74 65 28 74 |.load_template(t| 00002180 69 74 6c 65 24 29 0d 0e 92 3d c8 99 22 57 69 6d |itle$)...=.."Wim| 00002190 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 74 65 22 2c |p_LoadTemplate",| 000021a0 2c 71 25 2c 69 6e 64 25 2c 69 6e 64 65 6e 64 25 |,q%,ind%,indend%| 000021b0 2c 2d 31 2c 74 69 74 6c 65 24 20 b8 20 2c 2c 69 |,-1,title$ . ,,i| 000021c0 6e 64 25 0d 0e 9c 25 c8 99 22 57 69 6d 70 5f 43 |nd%...%.."Wimp_C| 000021d0 72 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c 71 25 |reateWindow",,q%| 000021e0 20 b8 20 77 69 6e 64 25 0d 0e a6 0a 3d 77 69 6e | . wind%....=win| 000021f0 64 25 0d 0e b0 04 0d 0e ba 18 dd 20 f2 77 69 6e |d%......... .win| 00002200 64 6f 77 5f 70 6f 70 75 70 28 21 71 25 29 0d 0e |dow_popup(!q%)..| 00002210 c4 1f c8 99 22 57 69 6d 70 5f 47 65 74 57 69 6e |...."Wimp_GetWin| 00002220 64 6f 77 53 74 61 74 65 22 2c 2c 71 25 0d 0e ce |dowState",,q%...| 00002230 0c 71 25 21 32 38 3d 2d 31 0d 0e d8 14 f2 77 69 |.q%!28=-1.....wi| 00002240 6e 64 6f 77 5f 6f 70 65 6e 28 71 25 29 0d 0e e2 |ndow_open(q%)...| 00002250 05 e1 0d 0e ec 04 0d 0e f6 16 dd 20 f2 77 69 6e |........... .win| 00002260 64 6f 77 5f 6f 70 65 6e 28 71 25 29 0d 0f 00 12 |dow_open(q%)....| 00002270 77 78 25 3d 71 25 21 34 2d 71 25 21 32 30 0d 0f |wx%=q%!4-q%!20..| 00002280 0a 13 77 79 25 3d 71 25 21 31 36 2d 71 25 21 32 |..wy%=q%!16-q%!2| 00002290 34 0d 0f 14 1b c8 99 22 57 69 6d 70 5f 4f 70 65 |4......"Wimp_Ope| 000022a0 6e 57 69 6e 64 6f 77 22 2c 2c 71 25 0d 0f 1e 05 |nWindow",,q%....| 000022b0 e1 0d 0f 28 04 0d 0f 32 1f dd 20 f2 6f 70 65 6e |...(...2.. .open| 000022c0 5f 6d 65 6e 75 28 6d 65 6e 75 25 2c 6d 78 25 2c |_menu(menu%,mx%,| 000022d0 6d 79 25 29 0d 0f 3c 26 c8 99 22 57 69 6d 70 5f |my%)..<&.."Wimp_| 000022e0 43 72 65 61 74 65 4d 65 6e 75 22 2c 2c 6d 65 6e |CreateMenu",,men| 000022f0 75 25 2c 6d 78 25 2c 6d 79 25 0d 0f 46 14 6f 70 |u%,mx%,my%..F.op| 00002300 65 6e 5f 6d 65 6e 75 25 3d 6d 65 6e 75 25 0d 0f |en_menu%=menu%..| 00002310 50 05 e1 0d 0f 5a 04 0d 0f 64 18 dd 20 a4 73 74 |P....Z...d.. .st| 00002320 61 72 74 5f 6d 65 6e 75 28 6e 61 6d 65 24 29 0d |art_menu(name$).| 00002330 0f 6e 13 6c 6f 6e 67 65 73 74 25 3d a9 6e 61 6d |.n.longest%=.nam| 00002340 65 24 0d 0f 78 1b 6d 65 6e 75 5f 73 74 61 72 74 |e$..x.menu_start| 00002350 25 3d 6d 65 6e 75 5f 62 6c 6f 63 6b 25 0d 0f 82 |%=menu_block%...| 00002360 16 24 6d 65 6e 75 5f 62 6c 6f 63 6b 25 3d 6e 61 |.$menu_block%=na| 00002370 6d 65 24 0d 0f 8c 19 6d 65 6e 75 5f 62 6c 6f 63 |me$....menu_bloc| 00002380 6b 25 21 31 32 3d 26 37 30 32 30 37 0d 0f 96 15 |k%!12=&70207....| 00002390 6d 65 6e 75 5f 62 6c 6f 63 6b 25 21 32 30 3d 34 |menu_block%!20=4| 000023a0 34 0d 0f a0 14 6d 65 6e 75 5f 62 6c 6f 63 6b 25 |4....menu_block%| 000023b0 21 32 34 3d 30 0d 0f aa 13 6d 65 6e 75 5f 62 6c |!24=0....menu_bl| 000023c0 6f 63 6b 25 2b 3d 32 38 0d 0f b4 10 3d 6d 65 6e |ock%+=28....=men| 000023d0 75 5f 73 74 61 72 74 25 0d 0f be 04 0d 0f c8 1d |u_start%........| 000023e0 dd 20 f2 6d 65 6e 75 5f 69 74 65 6d 28 69 74 65 |. .menu_item(ite| 000023f0 6d 24 2c 6c 69 6e 6b 25 29 0d 0f d2 27 e7 20 a9 |m$,link%)...'. .| 00002400 69 74 65 6d 24 3e 6c 6f 6e 67 65 73 74 25 20 8c |item$>longest% .| 00002410 20 6c 6f 6e 67 65 73 74 25 3d a9 69 74 65 6d 24 | longest%=.item$| 00002420 0d 0f dc 12 21 6d 65 6e 75 5f 62 6c 6f 63 6b 25 |....!menu_block%| 00002430 3d 30 0d 0f e6 17 6d 65 6e 75 5f 62 6c 6f 63 6b |=0....menu_block| 00002440 25 21 34 3d 6c 69 6e 6b 25 0d 0f f0 1a 6d 65 6e |%!4=link%....men| 00002450 75 5f 62 6c 6f 63 6b 25 21 38 3d 26 37 30 30 30 |u_block%!8=&7000| 00002460 30 32 31 0d 0f fa 1b 24 28 6d 65 6e 75 5f 62 6c |021....$(menu_bl| 00002470 6f 63 6b 25 2b 31 32 29 3d 69 74 65 6d 24 0d 10 |ock%+12)=item$..| 00002480 04 13 6d 65 6e 75 5f 62 6c 6f 63 6b 25 2b 3d 32 |..menu_block%+=2| 00002490 34 0d 10 0e 05 e1 0d 10 18 04 0d 10 22 27 dd 20 |4..........."'. | 000024a0 f2 6d 65 6e 75 5f 69 6e 64 5f 69 74 65 6d 28 74 |.menu_ind_item(t| 000024b0 65 78 74 25 2c 76 61 6c 69 64 25 2c 6c 65 6e 25 |ext%,valid%,len%| 000024c0 29 0d 10 2c 27 e7 20 6c 65 6e 25 2d 31 3e 6c 6f |)..,'. len%-1>lo| 000024d0 6e 67 65 73 74 25 20 8c 20 6c 6f 6e 67 65 73 74 |ngest% . longest| 000024e0 25 3d 6c 65 6e 25 2d 31 0d 10 36 12 21 6d 65 6e |%=len%-1..6.!men| 000024f0 75 5f 62 6c 6f 63 6b 25 3d 30 0d 10 40 13 6d 65 |u_block%=0..@.me| 00002500 6e 75 5f 62 6c 6f 63 6b 25 21 34 3d 30 0d 10 4a |nu_block%!4=0..J| 00002510 1a 6d 65 6e 75 5f 62 6c 6f 63 6b 25 21 38 3d 26 |.menu_block%!8=&| 00002520 37 30 30 30 31 32 31 0d 10 54 18 6d 65 6e 75 5f |7000121..T.menu_| 00002530 62 6c 6f 63 6b 25 21 31 32 3d 74 65 78 74 25 0d |block%!12=text%.| 00002540 10 5e 19 6d 65 6e 75 5f 62 6c 6f 63 6b 25 21 31 |.^.menu_block%!1| 00002550 36 3d 76 61 6c 69 64 25 0d 10 68 17 6d 65 6e 75 |6=valid%..h.menu| 00002560 5f 62 6c 6f 63 6b 25 21 32 30 3d 6c 65 6e 25 0d |_block%!20=len%.| 00002570 10 72 13 6d 65 6e 75 5f 62 6c 6f 63 6b 25 2b 3d |.r.menu_block%+=| 00002580 32 34 0d 10 7c 05 e1 0d 10 86 04 0d 10 90 0f dd |24..|...........| 00002590 20 f2 65 6e 64 5f 6d 65 6e 75 0d 10 9a 22 6d 65 | .end_menu..."me| 000025a0 6e 75 5f 73 74 61 72 74 25 21 31 36 3d 28 6c 6f |nu_start%!16=(lo| 000025b0 6e 67 65 73 74 25 2b 31 29 2a 31 36 0d 10 a4 2d |ngest%+1)*16...-| 000025c0 21 28 6d 65 6e 75 5f 62 6c 6f 63 6b 25 2d 32 34 |!(menu_block%-24| 000025d0 29 3d 21 28 6d 65 6e 75 5f 62 6c 6f 63 6b 25 2d |)=!(menu_block%-| 000025e0 32 34 29 20 84 20 26 38 30 0d 10 ae 05 e1 0d 10 |24) . &80.......| 000025f0 b8 04 0d 10 c2 25 dd 20 f2 6d 65 6e 75 5f 73 68 |.....%. .menu_sh| 00002600 61 64 65 28 6d 65 6e 75 25 2c 69 74 65 6d 25 2c |ade(menu%,item%,| 00002610 73 68 61 64 65 25 29 0d 10 cc 18 70 25 3d 6d 65 |shade%)....p%=me| 00002620 6e 75 25 2b 33 36 2b 69 74 65 6d 25 2a 32 34 0d |nu%+36+item%*24.| 00002630 10 d6 15 21 70 25 3d 21 70 25 20 80 ac 28 31 3c |...!p%=!p% ..(1<| 00002640 3c 32 32 29 0d 10 e0 1f e7 20 73 68 61 64 65 25 |<22)..... shade%| 00002650 20 8c 20 21 70 25 3d 21 70 25 20 84 28 31 3c 3c | . !p%=!p% .(1<<| 00002660 32 32 29 0d 10 ea 05 e1 0d 10 f4 04 0d 10 fe 22 |22)............"| 00002670 dd 20 f2 6d 65 73 73 61 67 65 5f 6c 6f 61 64 28 |. .message_load(| 00002680 6d 65 73 73 61 67 65 5f 66 69 6c 65 24 29 0d 11 |message_file$)..| 00002690 08 42 c8 99 22 4d 65 73 73 61 67 65 54 72 61 6e |.B.."MessageTran| 000026a0 73 5f 46 69 6c 65 49 6e 66 6f 22 2c 2c 6d 65 73 |s_FileInfo",,mes| 000026b0 73 61 67 65 5f 66 69 6c 65 24 20 b8 20 2c 2c 6d |sage_file$ . ,,m| 000026c0 65 73 73 61 67 65 5f 73 69 7a 65 25 3b 6f 6b 25 |essage_size%;ok%| 000026d0 0d 11 12 1d de 20 6d 65 73 73 61 67 65 73 25 20 |..... messages% | 000026e0 6d 65 73 73 61 67 65 5f 73 69 7a 65 25 0d 11 1c |message_size%...| 000026f0 16 de 20 6d 65 73 73 61 67 65 5f 64 65 73 63 25 |.. message_desc%| 00002700 20 31 36 0d 11 26 19 de 20 6d 65 73 73 61 67 65 | 16..&.. message| 00002710 5f 62 75 66 66 65 72 25 20 32 35 36 0d 11 30 43 |_buffer% 256..0C| 00002720 c8 99 22 4d 65 73 73 61 67 65 54 72 61 6e 73 5f |.."MessageTrans_| 00002730 4f 70 65 6e 46 69 6c 65 22 2c 6d 65 73 73 61 67 |OpenFile",messag| 00002740 65 5f 64 65 73 63 25 2c 6d 65 73 73 61 67 65 5f |e_desc%,message_| 00002750 66 69 6c 65 24 2c 6d 65 73 73 61 67 65 73 25 0d |file$,messages%.| 00002760 11 3a 05 e1 0d 11 44 04 0d 11 4e 16 dd 20 a4 6d |.:....D...N.. .m| 00002770 65 73 73 61 67 65 28 74 6f 6b 65 6e 24 29 0d 11 |essage(token$)..| 00002780 58 4c c8 99 22 58 4d 65 73 73 61 67 65 54 72 61 |XL.."XMessageTra| 00002790 6e 73 5f 4c 6f 6f 6b 75 70 22 2c 6d 65 73 73 61 |ns_Lookup",messa| 000027a0 67 65 5f 64 65 73 63 25 2c 74 6f 6b 65 6e 24 2c |ge_desc%,token$,| 000027b0 6d 65 73 73 61 67 65 5f 62 75 66 66 65 72 25 2c |message_buffer%,| 000027c0 32 35 35 20 b8 20 3b 6f 6b 25 0d 11 62 24 e7 20 |255 . ;ok%..b$. | 000027d0 28 6f 6b 25 80 31 29 3d 31 20 8c 20 3f 6d 65 73 |(ok%.1)=1 . ?mes| 000027e0 73 61 67 65 5f 62 75 66 66 65 72 25 3d 30 0d 11 |sage_buffer%=0..| 000027f0 6c 1d 3d a4 73 74 72 69 6e 67 28 6d 65 73 73 61 |l.=.string(messa| 00002800 67 65 5f 62 75 66 66 65 72 25 29 0d 11 76 04 0d |ge_buffer%)..v..| 00002810 11 80 1c dd 20 a4 6d 65 73 73 61 67 65 30 28 74 |.... .message0(t| 00002820 6f 6b 65 6e 24 2c 73 74 30 24 29 0d 11 8a 51 c8 |oken$,st0$)...Q.| 00002830 99 22 58 4d 65 73 73 61 67 65 54 72 61 6e 73 5f |."XMessageTrans_| 00002840 4c 6f 6f 6b 75 70 22 2c 6d 65 73 73 61 67 65 5f |Lookup",message_| 00002850 64 65 73 63 25 2c 74 6f 6b 65 6e 24 2c 6d 65 73 |desc%,token$,mes| 00002860 73 61 67 65 5f 62 75 66 66 65 72 25 2c 32 35 35 |sage_buffer%,255| 00002870 2c 73 74 30 24 20 b8 20 3b 6f 6b 25 0d 11 94 24 |,st0$ . ;ok%...$| 00002880 e7 20 28 6f 6b 25 80 31 29 3d 31 20 8c 20 3f 6d |. (ok%.1)=1 . ?m| 00002890 65 73 73 61 67 65 5f 62 75 66 66 65 72 25 3d 30 |essage_buffer%=0| 000028a0 0d 11 9e 1d 3d a4 73 74 72 69 6e 67 28 6d 65 73 |....=.string(mes| 000028b0 73 61 67 65 5f 62 75 66 66 65 72 25 29 0d 11 a8 |sage_buffer%)...| 000028c0 04 0d 11 b2 14 dd 20 f2 6d 65 73 73 61 67 65 5f |...... .message_| 000028d0 63 6c 6f 73 65 0d 11 bc 2c c8 99 22 4d 65 73 73 |close...,.."Mess| 000028e0 61 67 65 54 72 61 6e 73 5f 43 6c 6f 73 65 46 69 |ageTrans_CloseFi| 000028f0 6c 65 22 2c 6d 65 73 73 61 67 65 5f 64 65 73 63 |le",message_desc| 00002900 25 0d 11 c6 05 e1 0d 11 d0 04 0d 11 da 13 dd 20 |%.............. | 00002910 a4 73 74 72 69 6e 67 28 70 6f 73 25 29 0d 11 e4 |.string(pos%)...| 00002920 09 ea 20 73 74 24 0d 11 ee 0f c8 95 20 3f 70 6f |.. st$...... ?po| 00002930 73 25 3e 33 31 0d 11 f8 13 20 20 73 74 24 2b 3d |s%>31.... st$+=| 00002940 bd 28 3f 70 6f 73 25 29 0d 12 02 0d 20 20 70 6f |.(?pos%).... po| 00002950 73 25 2b 3d 31 0d 12 0c 05 ce 0d 12 16 08 3d 73 |s%+=1.........=s| 00002960 74 24 0d 12 20 04 0d 12 2a 10 dd 20 a4 63 61 70 |t$.. ...*.. .cap| 00002970 73 28 73 74 24 29 0d 12 34 08 ea 20 61 25 0d 12 |s(st$)..4.. a%..| 00002980 3e 0c e7 20 a9 73 74 24 20 8c 0d 12 48 4a 20 20 |>.. .st$ ...HJ | 00002990 e7 20 c1 73 74 24 2c 61 25 2c 31 29 3e 3d 22 61 |. .st$,a%,1)>="a| 000029a0 22 20 80 20 c1 73 74 24 2c 61 25 2c 31 29 3c 3d |" . .st$,a%,1)<=| 000029b0 22 7a 22 20 8c 20 c1 73 74 24 2c 61 25 2c 31 29 |"z" . .st$,a%,1)| 000029c0 3d bd 28 97 28 c1 73 74 24 2c 61 25 2c 31 29 29 |=.(.(.st$,a%,1))| 000029d0 2d 33 32 29 0d 12 52 05 cd 0d 12 5c 08 3d 73 74 |-32)..R....\.=st| 000029e0 24 0d 12 66 04 0d 12 70 1c dd 20 a4 73 74 72 69 |$..f...p.. .stri| 000029f0 70 5f 65 6e 64 5f 73 70 61 63 65 73 28 73 74 24 |p_end_spaces(st$| 00002a00 29 0d 12 7a 12 c8 95 20 c2 73 74 24 2c 31 29 3d |)..z... .st$,1)=| 00002a10 22 20 22 0d 12 84 16 20 20 73 74 24 3d c1 73 74 |" ".... st$=.st| 00002a20 24 2c a9 73 74 24 2d 31 29 0d 12 8e 05 ce 0d 12 |$,.st$-1).......| 00002a30 98 08 3d 73 74 24 0d 12 a2 04 0d 12 ac 1c dd 20 |..=st$......... | 00002a40 f2 72 65 70 6f 72 74 5f 65 72 72 6f 72 28 24 28 |.report_error($(| 00002a50 71 25 2b 34 29 29 0d 12 b6 26 f4 20 57 68 6f 6f |q%+4))...&. Whoo| 00002a60 70 73 20 73 6f 6d 65 74 68 69 6e 67 20 68 61 73 |ps something has| 00002a70 20 67 6f 6e 65 20 77 72 6f 6e 67 21 0d 12 c0 0b | gone wrong!....| 00002a80 21 71 25 3d 32 35 35 0d 12 ca 26 c8 99 22 57 69 |!q%=255...&.."Wi| 00002a90 6d 70 5f 52 65 70 6f 72 74 45 72 72 6f 72 22 2c |mp_ReportError",| 00002aa0 71 25 2c 31 2c 6d 79 5f 6e 61 6d 65 24 0d 12 d4 |q%,1,my_name$...| 00002ab0 05 e1 0d ff |....| 00002ab4