Home » Archimedes archive » Acorn User » AU 1995-10.adf » !Direct » Director/!Director/Menus/System/Variables
Director/!Director/Menus/System/Variables
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 1995-10.adf » !Direct |
Filename: | Director/!Director/Menus/System/Variables |
Read OK: | ✔ |
File size: | 05C9 bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Acorn User » AU 1995-10.adf » !Direct » Director/!Director/Menus/System/Variables
- Archimedes archive » Acorn User » AU 1998-09.adf » Features » DesktopPD/Director/!Director/Menus/System/Variables
File contents
1REM >Director:Menus.System.Variables 2ON ERROR ERROR EXT ERR,REPORT$+" at line "+STR$ERL:END 3 4DIM buf 1024 5SYS "OS_GetEnv" TO in$ 6match$=FNarg(in$,"-match","") 7search=(ASCmatch$=34) 8not$=FNarg(in$,"-not","") 9IF search THEN 10 SYS "Director_Menu",MID$(match$,2)+" Varlist -temp" 11 search$=FNlc(MID$(match$,2)) 12 match$="*" 13ELSE 14 SYS "Director_Menu",match$+" Varlist -temp" 15ENDIF 16os_rvv=FNswi_number("XOS_ReadVarVal") 17option=FNswi_number("Director_Option") 18ptr=0 19REPEAT 20 SYS os_rvv,match$,buf,1024,ptr,3 TO ,,read,ptr,type ;f 21 IF ptr<>0 AND (f AND 1)=0 THEN 22 var$=FN0(ptr) 23 IF FNlc(RIGHT$(var$,5))="$path" THEN 24 path$=LEFT$(var$,LEN(var$)-5)+":" 25 ELSE 26 IF FNlc(RIGHT$(var$,4))="$dir" THEN 27 path$="|||<"+var$+">" 28 ELSE 29 path$="" 30 ENDIF 31 ENDIF 32 IF NOT search THEN 33 IF not$="" OR INSTR(var$,not$)=0 SYS option,var$+" -sub ""Dynamic:VarVal |<MenuText|> "+path$+"""" 34 ELSE 35 buf?read=13 36 IF var$<>"MenuText" AND var$<>"Alias$DirectorRun" THEN 37 IF INSTR(FNlc($buf),search$)>0 SYS option,var$+" -sub ""Dynamic:VarVal |<MenuText|> "+path$+"""" 38 ENDIF 39 ENDIF 40 ENDIF 41UNTIL ptr=0 42*EndMenu 43*Set Director$Menu Varlist 44END 45 46DEF FNarg(str$,arg$,def$) 47LOCAL i,j 48i=INSTR(str$,arg$) 49IF i=0 THEN =def$ 50i+=LENarg$+1 51j=INSTR(str$+" <"," ",i) 52=MID$(str$,i,j-i) 53 54DEF FNswi_number(swi$) 55SYS "OS_SWINumberFromString",,swi$ TO swi% 56=swi% 57 58DEF FN0(a) 59a$="" 60WHILE ?a<>0 61 a$+=CHR$?a 62 a+=1 63ENDWHILE 64=a$ 65 66DEF FNlc(a$) 67FOR i=1 TO LENa$ 68 c=ASCMID$(a$,i,1) 69 IF c>=65 AND c<=90 MID$(a$,i,1)=CHR$(c+32) 70NEXT 71=a$
&� >Director:Menus.System.Variables !� � � � �,�$+" at line "+Þ:� � buf 1024 ș "OS_GetEnv" � in$ match$=�arg(in$,"-match","") search=(�match$=34) not$=�arg(in$,"-not","") � search � 3 ș "Director_Menu",�match$,2)+" Varlist -temp" search$=�lc(�match$,2)) match$="*" � / ș "Director_Menu",match$+" Varlist -temp" � (os_rvv=�swi_number("XOS_ReadVarVal") )option=�swi_number("Director_Option") ptr=0 � 9 ș os_rvv,match$,buf,1024,ptr,3 � ,,read,ptr,type ;f � ptr<>0 � (f � 1)=0 � var$=�0(ptr) � �lc(�var$,5))="$path" � " path$=�var$,�(var$)-5)+":" � � �lc(�var$,4))="$dir" � path$="|||<"+var$+">" � path$="" � � � � search � !a � not$="" � �var$,not$)=0 ș option,var$+" -sub ""Dynamic:VarVal |<MenuText|> "+path$+"""" " � # buf?read=13 $7 � var$<>"MenuText" � var$<>"Alias$DirectorRun" � %` � ��lc($buf),search$)>0 ș option,var$+" -sub ""Dynamic:VarVal |<MenuText|> "+path$+"""" & � ' � ( � )� ptr=0 **EndMenu +*Set Director$Menu Varlist ,� - .� �arg(str$,arg$,def$) / � i,j 0i=�str$,arg$) 1� i=0 � =def$ 2i+=�arg$+1 3j=�str$+" <"," ",i) 4=�str$,i,j-i) 5 6� �swi_number(swi$) 7,ș "OS_SWINumberFromString",,swi$ � swi% 8 =swi% 9 :� �0(a) ; a$="" <ȕ ?a<>0 = a$+=�?a > a+=1 ?� @=a$ A B � �lc(a$) C� i=1 � �a$ D c=��a$,i,1) E% � c>=65 � c<=90 �a$,i,1)=�(c+32) F� G=a$ �
00000000 0d 00 01 26 f4 20 3e 44 69 72 65 63 74 6f 72 3a |...&. >Director:| 00000010 4d 65 6e 75 73 2e 53 79 73 74 65 6d 2e 56 61 72 |Menus.System.Var| 00000020 69 61 62 6c 65 73 0d 00 02 21 ee 20 85 20 85 20 |iables...!. . . | 00000030 a2 20 9f 2c f6 24 2b 22 20 61 74 20 6c 69 6e 65 |. .,.$+" at line| 00000040 20 22 2b c3 9e 3a e0 0d 00 03 04 0d 00 04 0e de | "+..:..........| 00000050 20 62 75 66 20 31 30 32 34 0d 00 05 18 c8 99 20 | buf 1024...... | 00000060 22 4f 53 5f 47 65 74 45 6e 76 22 20 b8 20 69 6e |"OS_GetEnv" . in| 00000070 24 0d 00 06 20 6d 61 74 63 68 24 3d a4 61 72 67 |$... match$=.arg| 00000080 28 69 6e 24 2c 22 2d 6d 61 74 63 68 22 2c 22 22 |(in$,"-match",""| 00000090 29 0d 00 07 17 73 65 61 72 63 68 3d 28 97 6d 61 |)....search=(.ma| 000000a0 74 63 68 24 3d 33 34 29 0d 00 08 1c 6e 6f 74 24 |tch$=34)....not$| 000000b0 3d a4 61 72 67 28 69 6e 24 2c 22 2d 6e 6f 74 22 |=.arg(in$,"-not"| 000000c0 2c 22 22 29 0d 00 09 0e e7 20 73 65 61 72 63 68 |,"")..... search| 000000d0 20 8c 0d 00 0a 33 20 c8 99 20 22 44 69 72 65 63 | ....3 .. "Direc| 000000e0 74 6f 72 5f 4d 65 6e 75 22 2c c1 6d 61 74 63 68 |tor_Menu",.match| 000000f0 24 2c 32 29 2b 22 20 56 61 72 6c 69 73 74 20 2d |$,2)+" Varlist -| 00000100 74 65 6d 70 22 0d 00 0b 1c 20 73 65 61 72 63 68 |temp".... search| 00000110 24 3d a4 6c 63 28 c1 6d 61 74 63 68 24 2c 32 29 |$=.lc(.match$,2)| 00000120 29 0d 00 0c 0f 20 6d 61 74 63 68 24 3d 22 2a 22 |).... match$="*"| 00000130 0d 00 0d 05 cc 0d 00 0e 2f 20 c8 99 20 22 44 69 |......../ .. "Di| 00000140 72 65 63 74 6f 72 5f 4d 65 6e 75 22 2c 6d 61 74 |rector_Menu",mat| 00000150 63 68 24 2b 22 20 56 61 72 6c 69 73 74 20 2d 74 |ch$+" Varlist -t| 00000160 65 6d 70 22 0d 00 0f 05 cd 0d 00 10 28 6f 73 5f |emp"........(os_| 00000170 72 76 76 3d a4 73 77 69 5f 6e 75 6d 62 65 72 28 |rvv=.swi_number(| 00000180 22 58 4f 53 5f 52 65 61 64 56 61 72 56 61 6c 22 |"XOS_ReadVarVal"| 00000190 29 0d 00 11 29 6f 70 74 69 6f 6e 3d a4 73 77 69 |)...)option=.swi| 000001a0 5f 6e 75 6d 62 65 72 28 22 44 69 72 65 63 74 6f |_number("Directo| 000001b0 72 5f 4f 70 74 69 6f 6e 22 29 0d 00 12 09 70 74 |r_Option")....pt| 000001c0 72 3d 30 0d 00 13 05 f5 0d 00 14 39 20 c8 99 20 |r=0........9 .. | 000001d0 6f 73 5f 72 76 76 2c 6d 61 74 63 68 24 2c 62 75 |os_rvv,match$,bu| 000001e0 66 2c 31 30 32 34 2c 70 74 72 2c 33 20 b8 20 2c |f,1024,ptr,3 . ,| 000001f0 2c 72 65 61 64 2c 70 74 72 2c 74 79 70 65 20 3b |,read,ptr,type ;| 00000200 66 0d 00 15 1b 20 e7 20 70 74 72 3c 3e 30 20 80 |f.... . ptr<>0 .| 00000210 20 28 66 20 80 20 31 29 3d 30 20 8c 0d 00 16 12 | (f . 1)=0 .....| 00000220 20 20 76 61 72 24 3d a4 30 28 70 74 72 29 0d 00 | var$=.0(ptr)..| 00000230 17 1f 20 20 e7 20 a4 6c 63 28 c2 76 61 72 24 2c |.. . .lc(.var$,| 00000240 35 29 29 3d 22 24 70 61 74 68 22 20 8c 0d 00 18 |5))="$path" ....| 00000250 22 20 20 20 20 70 61 74 68 24 3d c0 76 61 72 24 |" path$=.var$| 00000260 2c a9 28 76 61 72 24 29 2d 35 29 2b 22 3a 22 0d |,.(var$)-5)+":".| 00000270 00 19 07 20 20 cc 0d 00 1a 20 20 20 20 20 e7 20 |... .... . | 00000280 a4 6c 63 28 c2 76 61 72 24 2c 34 29 29 3d 22 24 |.lc(.var$,4))="$| 00000290 64 69 72 22 20 8c 0d 00 1b 1f 20 20 20 20 20 20 |dir" ..... | 000002a0 70 61 74 68 24 3d 22 7c 7c 7c 3c 22 2b 76 61 72 |path$="|||<"+var| 000002b0 24 2b 22 3e 22 0d 00 1c 09 20 20 20 20 cc 0d 00 |$+">".... ...| 000002c0 1d 12 20 20 20 20 20 20 70 61 74 68 24 3d 22 22 |.. path$=""| 000002d0 0d 00 1e 09 20 20 20 20 cd 0d 00 1f 07 20 20 cd |.... ..... .| 000002e0 0d 00 20 12 20 20 e7 20 ac 20 73 65 61 72 63 68 |.. . . . search| 000002f0 20 8c 0d 00 21 61 20 20 20 e7 20 6e 6f 74 24 3d | ...!a . not$=| 00000300 22 22 20 84 20 a7 76 61 72 24 2c 6e 6f 74 24 29 |"" . .var$,not$)| 00000310 3d 30 20 c8 99 20 6f 70 74 69 6f 6e 2c 76 61 72 |=0 .. option,var| 00000320 24 2b 22 20 2d 73 75 62 20 22 22 44 79 6e 61 6d |$+" -sub ""Dynam| 00000330 69 63 3a 56 61 72 56 61 6c 20 7c 3c 4d 65 6e 75 |ic:VarVal |<Menu| 00000340 54 65 78 74 7c 3e 20 22 2b 70 61 74 68 24 2b 22 |Text|> "+path$+"| 00000350 22 22 22 0d 00 22 07 20 20 cc 0d 00 23 12 20 20 |"""..". ...#. | 00000360 20 62 75 66 3f 72 65 61 64 3d 31 33 0d 00 24 37 | buf?read=13..$7| 00000370 20 20 20 e7 20 76 61 72 24 3c 3e 22 4d 65 6e 75 | . var$<>"Menu| 00000380 54 65 78 74 22 20 80 20 76 61 72 24 3c 3e 22 41 |Text" . var$<>"A| 00000390 6c 69 61 73 24 44 69 72 65 63 74 6f 72 52 75 6e |lias$DirectorRun| 000003a0 22 20 8c 0d 00 25 60 20 20 20 20 e7 20 a7 a4 6c |" ...%` . ..l| 000003b0 63 28 24 62 75 66 29 2c 73 65 61 72 63 68 24 29 |c($buf),search$)| 000003c0 3e 30 20 c8 99 20 6f 70 74 69 6f 6e 2c 76 61 72 |>0 .. option,var| 000003d0 24 2b 22 20 2d 73 75 62 20 22 22 44 79 6e 61 6d |$+" -sub ""Dynam| 000003e0 69 63 3a 56 61 72 56 61 6c 20 7c 3c 4d 65 6e 75 |ic:VarVal |<Menu| 000003f0 54 65 78 74 7c 3e 20 22 2b 70 61 74 68 24 2b 22 |Text|> "+path$+"| 00000400 22 22 22 0d 00 26 08 20 20 20 cd 0d 00 27 07 20 |"""..&. ...'. | 00000410 20 cd 0d 00 28 06 20 cd 0d 00 29 0b fd 20 70 74 | ...(. ...).. pt| 00000420 72 3d 30 0d 00 2a 0c 2a 45 6e 64 4d 65 6e 75 0d |r=0..*.*EndMenu.| 00000430 00 2b 1e 2a 53 65 74 20 44 69 72 65 63 74 6f 72 |.+.*Set Director| 00000440 24 4d 65 6e 75 20 56 61 72 6c 69 73 74 0d 00 2c |$Menu Varlist..,| 00000450 05 e0 0d 00 2d 04 0d 00 2e 1a dd 20 a4 61 72 67 |....-...... .arg| 00000460 28 73 74 72 24 2c 61 72 67 24 2c 64 65 66 24 29 |(str$,arg$,def$)| 00000470 0d 00 2f 09 ea 20 69 2c 6a 0d 00 30 11 69 3d a7 |../.. i,j..0.i=.| 00000480 73 74 72 24 2c 61 72 67 24 29 0d 00 31 11 e7 20 |str$,arg$)..1.. | 00000490 69 3d 30 20 8c 20 3d 64 65 66 24 0d 00 32 0e 69 |i=0 . =def$..2.i| 000004a0 2b 3d a9 61 72 67 24 2b 31 0d 00 33 17 6a 3d a7 |+=.arg$+1..3.j=.| 000004b0 73 74 72 24 2b 22 20 3c 22 2c 22 20 22 2c 69 29 |str$+" <"," ",i)| 000004c0 0d 00 34 11 3d c1 73 74 72 24 2c 69 2c 6a 2d 69 |..4.=.str$,i,j-i| 000004d0 29 0d 00 35 04 0d 00 36 17 dd 20 a4 73 77 69 5f |)..5...6.. .swi_| 000004e0 6e 75 6d 62 65 72 28 73 77 69 24 29 0d 00 37 2c |number(swi$)..7,| 000004f0 c8 99 20 22 4f 53 5f 53 57 49 4e 75 6d 62 65 72 |.. "OS_SWINumber| 00000500 46 72 6f 6d 53 74 72 69 6e 67 22 2c 2c 73 77 69 |FromString",,swi| 00000510 24 20 b8 20 73 77 69 25 0d 00 38 09 3d 73 77 69 |$ . swi%..8.=swi| 00000520 25 0d 00 39 04 0d 00 3a 0b dd 20 a4 30 28 61 29 |%..9...:.. .0(a)| 00000530 0d 00 3b 09 61 24 3d 22 22 0d 00 3c 0c c8 95 20 |..;.a$=""..<... | 00000540 3f 61 3c 3e 30 0d 00 3d 0c 20 61 24 2b 3d bd 3f |?a<>0..=. a$+=.?| 00000550 61 0d 00 3e 09 20 61 2b 3d 31 0d 00 3f 05 ce 0d |a..>. a+=1..?...| 00000560 00 40 07 3d 61 24 0d 00 41 04 0d 00 42 0d dd 20 |.@.=a$..A...B.. | 00000570 a4 6c 63 28 61 24 29 0d 00 43 0f e3 20 69 3d 31 |.lc(a$)..C.. i=1| 00000580 20 b8 20 a9 61 24 0d 00 44 10 20 63 3d 97 c1 61 | . .a$..D. c=..a| 00000590 24 2c 69 2c 31 29 0d 00 45 25 20 e7 20 63 3e 3d |$,i,1)..E% . c>=| 000005a0 36 35 20 80 20 63 3c 3d 39 30 20 c1 61 24 2c 69 |65 . c<=90 .a$,i| 000005b0 2c 31 29 3d bd 28 63 2b 33 32 29 0d 00 46 05 ed |,1)=.(c+32)..F..| 000005c0 0d 00 47 07 3d 61 24 0d ff |..G.=a$..| 000005c9