| GCW 11/12/06
| Run file for Links
| Based on the Boot file for Brian Brunswick's original Links application
| Changes made for running on Iyonix

| Sets up Key$CTRL system variable
Run <Obey$Dir>.KeyVar

| Put FirstLine,Path/Leaf on run path 
ifthere Run:FirstLine then else set Run$Path <Run$Path>,<Obey$Dir>.bin.
ifthere Run:Path/Leaf then else set Run$Path <Run$Path>,<Obey$Dir>.bin.

| Set up so SoftLinks can run
Set File$Type_FDC SoftLink
Set Alias$@RunType_FDC SoftRun %%0
Set Alias$SoftRun Firstline %%0|MSoftLink |<first$>
Set Alias$SoftLink Do SoftLink|<Key$CTRL> %%0
Set Alias$SoftLink1 Filer_See %%0
Set Alias$SoftLink0 Filer_Run %%0
Set Alias$Filer_See Path/Leaf %%0|M Do Filer_OpenDir |<Path>

| Set up for ctrl-dragging to create one
IF "<Alias$Copy>"="" THEN Set Alias$Copy %Copy %%*0
IF "<Alias$LinksCopy1>"="" THEN SetEval Alias$LinksCopy0 Alias$Copy
IF "<Alias$LinksCopy1>"="" THEN Set Alias$Copy Do LinksCopy|<Key$CTRL> %%*0
IF "<Alias$LinksCopy1>"="" THEN Set Alias$LinksCopy1 MkLink %%*0

| Actual code to create one
| There seems to be some strange mechanism that adds copy$options to end of this
| Hence the IF at end.
Set Alias$MkLink "echo { > %%1 } %%0|M SetType %%1 SoftLink|M IF 0 THEN "

| A feature of a future riscos that doesn't exist...
Set Alias$Filer_Action IF |<Key$CTRL>=0 THEN %Filer_Action %%*0