home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / jext-install.exe / {app} / bin / scripts / ScriptLoader.jext-script < prev   
Encoding:
Text File  |  2001-06-19  |  958 b   |  42 lines

  1. #######################################
  2. # SCRIPTS LOADER                      #
  3. #######################################
  4. # (C)2000 Romain Guy                  #
  5. # Dawn demonstration                  #
  6. #######################################
  7. # Loads a script from a file and adds #
  8. # it into the Tools-Dawn menu using a #
  9. # specified name. Useful to access    #
  10. # given scripts frequently.           #
  11. #######################################
  12.  
  13. "Script to load:\n(Current dir: "
  14. "." constructPath concat
  15. ")" concat input
  16.  
  17. source ->
  18. 0 sourceCount ->
  19.  
  20. source rcl constructPath
  21. try
  22.   "JEXT.SCRIPT2LOAD" openForInput
  23.  
  24.   while "JEXT.SCRIPT2LOAD" isFileAvailable repeat
  25.     "JEXT.SCRIPT2LOAD" readLine
  26.     sourceCount ++
  27.   wend
  28.  
  29.   1 sourceCount rcl 1 - i for
  30.     swap lineSeparator concat swap concat
  31.   next
  32. catch
  33.   "An error occured during loading !" msgBox
  34.   exit
  35. err
  36.  
  37. "Name: " input
  38. source rcl
  39. createAction
  40.  
  41. # End of script
  42.