home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / r / runif / !RunIf / Docs / Artworks
Encoding:
Text File  |  1997-01-07  |  4.5 KB  |  96 lines

  1. To alter ArtWorks and AWViewer to work with RunIf :
  2.  
  3.    Firstly, locate your copies of each of the above programs.
  4.    Start RunIf, by double clicking on the icon in the filer window, if it is
  5. not already running. Click on the icon on the icon bar to open the main
  6. window.
  7.    Drag the ArtWorks icon from the filer window to the relevant icon in
  8. the RunIf window. Personally, I prefer to have Artworks files loaded into
  9. Artworks if I'm _not_ pressing Alt, but this is a matter for personal
  10. preference.
  11.    Drag the AWViewer icon to the other part of the RunIf window. [So I'd
  12. drag it to the icon for if Alt _is_ pressed, but again, feel free to swap it
  13. round]
  14.    Change the file name in the save box to something sensible, like
  15. RunArtWrks and drag the Util icon to a filer window. [On a RiscPC I'd
  16. suggest in !Boot.Library]
  17.    You can now quit RunIf.
  18.    Add a line to your !Boot file which says the following
  19. Set Alias$@RunType_D94 Run Boot:Library.RunArtWrks %*0
  20. or something similar, depending on where you've put the file. Note that if
  21. you put this command in an Obey file, you'll need two % symbols rather than
  22. one.
  23.    [For a RiscPC boot sequence, I'd suggest putting this line in
  24. !Boot.Choices.Boot.Tasks.!Boot]
  25.    OK, that's the easy bit done.
  26.  
  27.    Now open the !ArtWorks directory viewer, by double clicking on the
  28. !ArtWorks icon in the filer window. Load the !Boot file from that directory
  29. into a text editor, such as Edit, Zap or StrongEd. In this file there's
  30. probably a line which says something like
  31. Set Alias$@RunType_D94 Run <ArtWorks$Dir>.!Run %%*0
  32.    Since you no longer want this to happen, you need to comment out this
  33. line, so put a vertical bar (|) at the start of that line.
  34.    The vertical bar is the one which on a RiscPC keyboard is obtained by
  35. pressing Shift and the key between the left shift key and the Z key. [ie,
  36. NOT the one obtained by pressing Alt and the key next to 1 on the main
  37. keyboard]
  38.    If you're using Tim Tyler's Obey mode for Zap, the line should turn red.
  39.    Save the !Boot file, and close the window.
  40.    Now do the same in the !Run file : comment out the line which says
  41. Set Alias$@RunType_D94 Run <ArtWorks$Dir>.!Run %%*0
  42.    [The !Run file is a lot longer than the !Boot file : you're looking for
  43. about the fourth from last line in the file]
  44.    Save this, too, and close the window.
  45.  
  46.    Now it's time to modify AWViewer. The instructions here are for v1.110,
  47. except I know that there are at least two different versions of AWViewer,
  48. both called v1.110 (27 Sep 1993). So, I'm trying to be as general as
  49. possible!
  50.    Open the directory viewer for !AWViewer, by shift-double-clicking on the
  51. icon in the filer window. Load !Run into your editor, and change the last
  52. line from
  53. Run <Obey$Dir>.!RunImage
  54. to
  55. Run <Obey$Dir>.!RunImage %*0
  56.    [Note that one % is correct!]
  57.    
  58.    Now load the !RunImage into the editor. This _should_ display correctly.
  59. However, if you get lots of [0d][00] and the like, you need to get a
  60. different editor, as it is not converting the Basic program into text. Zap
  61. will do the job for you, as will StrongEd. [Edit will, too, provided you're
  62. using RISC OS 3.00 or later]
  63.    Around the fourth line there should be a PROC call which looks something
  64. like PROCh("<AWViewer$Dir>.StartUp"). However, it may also be
  65. PROCm("<AWViewer$Dir>.StartUp"), or indeed, anything else at all!! However,
  66. I _think_ that the fact that it says "<AWViewer$Dir>.StartUp" is fairly
  67. consistent. Split the line up, so that this PROC call has a line of its own.
  68. So, eg, you get
  69. Q%=ha%:PROCw:PROCx:PROCy:PROCp
  70. PROCh("<AWViewer$Dir>.StartUp")
  71. ONERRORPROCo
  72.  
  73.    Immediately before the PROCh line (or PROCm, or whatever it is!), insert
  74. the following :
  75. SYS 16 TO env$:env%=0
  76. WHILE INSTR(env$," ",env%)>0
  77.   env%=INSTR(env$," ",env%)+1
  78. ENDWHILE
  79. env$=RIGHT$(env$,LENenv$-env%+1)
  80.  
  81.    Now you need to change the line which says
  82. PROCh("<AWViewer$Dir>.StartUp")
  83.    to the following
  84. IF env$="":PROCh("<AWViewer$Dir>.StartUp"):ELSE:PROCh(env$)
  85.    If your version of the program has the PROCm("<AWViewer$Dir>.StartUp")
  86. call, then use the above line, except with PROCm(xxx) instead of PROCh(xxx)
  87. Indeed, if your version of the program has another PROC name altogether, use
  88. the one which is used in the program.
  89.  
  90.    Now save this !RunImage file, and then the next time you re-boot, loading
  91. an ArtWorks file should load it into ArtWorks/AWViewer depending on whether
  92. you're pressing Alt or not.
  93.    
  94.    In case you're wondering why I don't just include a modified version of
  95. AWViewer, it's because I have a phobia of court cases. Especially ones where
  96. I'm found guily of breaking copyright. :-)