Home » Archimedes archive » Acorn User » AU 1998-09.adf » Features » DesktopPD/ExtraBar/!ExtraBar/!Run

DesktopPD/ExtraBar/!ExtraBar/!Run

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 1998-09.adf » Features
Filename: DesktopPD/ExtraBar/!ExtraBar/!Run
Read OK:
File size: 046E bytes
Load address: 0000
Exec address: 0000
File contents
| Extrabar !Run File
|
| (c) David McCormack 1996-1998
|

IconSprites <Obey$Dir>.!Sprites

Set ExtraBar$Dir <Obey$Dir>
Set ExtraBar$Path <Obey$Dir>.
Set Alias$@RunType_136 ExtraBar:!Run -file %%*0
Set File$Type_136 ExButton

| Check for RiscOS 3.1
| Set up nice error message when double click on files, if OS older that 3.1 
|
RMEnsure UtilityModule 3.10 Set Alias$@RunType_136 Error The application which loads the file %*0, requires RiscOS 3.1.
RMEnsure UtilityModule 3.10 Error Risc OS 3.1 needed to run this application.

If "<Wimp$ScrapDir>" = "" Then Error ExtraBar requires a Scrap directory to be available before it will load.
If "<ExtraBar$Running>" <> "" Then Error ExtraBar is already running.

| Load WimpKey module if not present
|
RMEnsure WimpKey 1.00 RMload <Obey$Dir>.RMStore.WimpKey
RMEnsure WimpKey 1.00 Error 0 Extrabar needs the WimpKey module to run.

| Load main code
|
WimpSlot -min 164K -max 164K

Set ExtraBar$RunImage "!Source"
IfThere <Obey$Dir>.!RunImage Then Set ExtraBar$RunImage "!RunImage"
If "<ExtraBar$RunImage>" <> "!Source" Then WimpSlot -min 96K -max 96K
Run <Obey$Dir>.<ExtraBar$RunImage> %*0
00000000  7c 20 45 78 74 72 61 62  61 72 20 21 52 75 6e 20  || Extrabar !Run |
00000010  46 69 6c 65 0a 7c 0a 7c  20 28 63 29 20 44 61 76  |File.|.| (c) Dav|
00000020  69 64 20 4d 63 43 6f 72  6d 61 63 6b 20 31 39 39  |id McCormack 199|
00000030  36 2d 31 39 39 38 0a 7c  0a 0a 49 63 6f 6e 53 70  |6-1998.|..IconSp|
00000040  72 69 74 65 73 20 3c 4f  62 65 79 24 44 69 72 3e  |rites <Obey$Dir>|
00000050  2e 21 53 70 72 69 74 65  73 0a 0a 53 65 74 20 45  |.!Sprites..Set E|
00000060  78 74 72 61 42 61 72 24  44 69 72 20 3c 4f 62 65  |xtraBar$Dir <Obe|
00000070  79 24 44 69 72 3e 0a 53  65 74 20 45 78 74 72 61  |y$Dir>.Set Extra|
00000080  42 61 72 24 50 61 74 68  20 3c 4f 62 65 79 24 44  |Bar$Path <Obey$D|
00000090  69 72 3e 2e 0a 53 65 74  20 41 6c 69 61 73 24 40  |ir>..Set Alias$@|
000000a0  52 75 6e 54 79 70 65 5f  31 33 36 20 45 78 74 72  |RunType_136 Extr|
000000b0  61 42 61 72 3a 21 52 75  6e 20 2d 66 69 6c 65 20  |aBar:!Run -file |
000000c0  25 25 2a 30 0a 53 65 74  20 46 69 6c 65 24 54 79  |%%*0.Set File$Ty|
000000d0  70 65 5f 31 33 36 20 45  78 42 75 74 74 6f 6e 0a  |pe_136 ExButton.|
000000e0  0a 7c 20 43 68 65 63 6b  20 66 6f 72 20 52 69 73  |.| Check for Ris|
000000f0  63 4f 53 20 33 2e 31 0a  7c 20 53 65 74 20 75 70  |cOS 3.1.| Set up|
00000100  20 6e 69 63 65 20 65 72  72 6f 72 20 6d 65 73 73  | nice error mess|
00000110  61 67 65 20 77 68 65 6e  20 64 6f 75 62 6c 65 20  |age when double |
00000120  63 6c 69 63 6b 20 6f 6e  20 66 69 6c 65 73 2c 20  |click on files, |
00000130  69 66 20 4f 53 20 6f 6c  64 65 72 20 74 68 61 74  |if OS older that|
00000140  20 33 2e 31 20 0a 7c 0a  52 4d 45 6e 73 75 72 65  | 3.1 .|.RMEnsure|
00000150  20 55 74 69 6c 69 74 79  4d 6f 64 75 6c 65 20 33  | UtilityModule 3|
00000160  2e 31 30 20 53 65 74 20  41 6c 69 61 73 24 40 52  |.10 Set Alias$@R|
00000170  75 6e 54 79 70 65 5f 31  33 36 20 45 72 72 6f 72  |unType_136 Error|
00000180  20 54 68 65 20 61 70 70  6c 69 63 61 74 69 6f 6e  | The application|
00000190  20 77 68 69 63 68 20 6c  6f 61 64 73 20 74 68 65  | which loads the|
000001a0  20 66 69 6c 65 20 25 2a  30 2c 20 72 65 71 75 69  | file %*0, requi|
000001b0  72 65 73 20 52 69 73 63  4f 53 20 33 2e 31 2e 0a  |res RiscOS 3.1..|
000001c0  52 4d 45 6e 73 75 72 65  20 55 74 69 6c 69 74 79  |RMEnsure Utility|
000001d0  4d 6f 64 75 6c 65 20 33  2e 31 30 20 45 72 72 6f  |Module 3.10 Erro|
000001e0  72 20 52 69 73 63 20 4f  53 20 33 2e 31 20 6e 65  |r Risc OS 3.1 ne|
000001f0  65 64 65 64 20 74 6f 20  72 75 6e 20 74 68 69 73  |eded to run this|
00000200  20 61 70 70 6c 69 63 61  74 69 6f 6e 2e 0a 0a 49  | application...I|
00000210  66 20 22 3c 57 69 6d 70  24 53 63 72 61 70 44 69  |f "<Wimp$ScrapDi|
00000220  72 3e 22 20 3d 20 22 22  20 54 68 65 6e 20 45 72  |r>" = "" Then Er|
00000230  72 6f 72 20 45 78 74 72  61 42 61 72 20 72 65 71  |ror ExtraBar req|
00000240  75 69 72 65 73 20 61 20  53 63 72 61 70 20 64 69  |uires a Scrap di|
00000250  72 65 63 74 6f 72 79 20  74 6f 20 62 65 20 61 76  |rectory to be av|
00000260  61 69 6c 61 62 6c 65 20  62 65 66 6f 72 65 20 69  |ailable before i|
00000270  74 20 77 69 6c 6c 20 6c  6f 61 64 2e 0a 49 66 20  |t will load..If |
00000280  22 3c 45 78 74 72 61 42  61 72 24 52 75 6e 6e 69  |"<ExtraBar$Runni|
00000290  6e 67 3e 22 20 3c 3e 20  22 22 20 54 68 65 6e 20  |ng>" <> "" Then |
000002a0  45 72 72 6f 72 20 45 78  74 72 61 42 61 72 20 69  |Error ExtraBar i|
000002b0  73 20 61 6c 72 65 61 64  79 20 72 75 6e 6e 69 6e  |s already runnin|
000002c0  67 2e 0a 0a 7c 20 4c 6f  61 64 20 57 69 6d 70 4b  |g...| Load WimpK|
000002d0  65 79 20 6d 6f 64 75 6c  65 20 69 66 20 6e 6f 74  |ey module if not|
000002e0  20 70 72 65 73 65 6e 74  0a 7c 0a 52 4d 45 6e 73  | present.|.RMEns|
000002f0  75 72 65 20 57 69 6d 70  4b 65 79 20 31 2e 30 30  |ure WimpKey 1.00|
00000300  20 52 4d 6c 6f 61 64 20  3c 4f 62 65 79 24 44 69  | RMload <Obey$Di|
00000310  72 3e 2e 52 4d 53 74 6f  72 65 2e 57 69 6d 70 4b  |r>.RMStore.WimpK|
00000320  65 79 0a 52 4d 45 6e 73  75 72 65 20 57 69 6d 70  |ey.RMEnsure Wimp|
00000330  4b 65 79 20 31 2e 30 30  20 45 72 72 6f 72 20 30  |Key 1.00 Error 0|
00000340  20 45 78 74 72 61 62 61  72 20 6e 65 65 64 73 20  | Extrabar needs |
00000350  74 68 65 20 57 69 6d 70  4b 65 79 20 6d 6f 64 75  |the WimpKey modu|
00000360  6c 65 20 74 6f 20 72 75  6e 2e 0a 0a 7c 20 4c 6f  |le to run...| Lo|
00000370  61 64 20 6d 61 69 6e 20  63 6f 64 65 0a 7c 0a 57  |ad main code.|.W|
00000380  69 6d 70 53 6c 6f 74 20  2d 6d 69 6e 20 31 36 34  |impSlot -min 164|
00000390  4b 20 2d 6d 61 78 20 31  36 34 4b 0a 0a 53 65 74  |K -max 164K..Set|
000003a0  20 45 78 74 72 61 42 61  72 24 52 75 6e 49 6d 61  | ExtraBar$RunIma|
000003b0  67 65 20 22 21 53 6f 75  72 63 65 22 0a 49 66 54  |ge "!Source".IfT|
000003c0  68 65 72 65 20 3c 4f 62  65 79 24 44 69 72 3e 2e  |here <Obey$Dir>.|
000003d0  21 52 75 6e 49 6d 61 67  65 20 54 68 65 6e 20 53  |!RunImage Then S|
000003e0  65 74 20 45 78 74 72 61  42 61 72 24 52 75 6e 49  |et ExtraBar$RunI|
000003f0  6d 61 67 65 20 22 21 52  75 6e 49 6d 61 67 65 22  |mage "!RunImage"|
00000400  0a 49 66 20 22 3c 45 78  74 72 61 42 61 72 24 52  |.If "<ExtraBar$R|
00000410  75 6e 49 6d 61 67 65 3e  22 20 3c 3e 20 22 21 53  |unImage>" <> "!S|
00000420  6f 75 72 63 65 22 20 54  68 65 6e 20 57 69 6d 70  |ource" Then Wimp|
00000430  53 6c 6f 74 20 2d 6d 69  6e 20 39 36 4b 20 2d 6d  |Slot -min 96K -m|
00000440  61 78 20 39 36 4b 0a 52  75 6e 20 3c 4f 62 65 79  |ax 96K.Run <Obey|
00000450  24 44 69 72 3e 2e 3c 45  78 74 72 61 42 61 72 24  |$Dir>.<ExtraBar$|
00000460  52 75 6e 49 6d 61 67 65  3e 20 25 2a 30 0a        |RunImage> %*0.|
0000046e