home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / WWW / Charon / Rexx / EditScript.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2000-01-01  |  1.1 KB  |  32 lines

  1. /* Example: Edit script */
  2.  
  3. OPTIONS RESULTS
  4.  
  5. PARSE ARG 'ID ' ID ' ERROR ' Err ' URL "' URL '" START ' DoStart ' PORT ' port .
  6.  
  7. ADDRESS(port)
  8.  
  9. /* The part up to now should be in every edit script */
  10.  
  11. /* You should check what/if you need to do anything with this URL */
  12. /* Note that most commands like START, SET etc. can't do anything */
  13. /* with locked URLs. So, it's preferable to do everything possible */
  14. /* (f. ex. set a flag that authorization needs to be added) before */
  15. /* URL is unlocked, and then *quickly* do everything that can't be */
  16. /* done while URL is locked */
  17.  
  18. IF LEFT(URL, 20) = 'http://www.test.com/' THEN DoIt = 1
  19. ELSE DoIt = 0
  20.  
  21. /* This has to be in every edit script or the URL will remain locked! */
  22. UNLOCKURL ID
  23.  
  24. /* Now, after the URL is unlocked you can do anything to it */
  25. /* Preferably very quickly! */
  26.  
  27. IF DoIt THEN SETAUTHORIZATION 'ID='||ID||' USERNAME username PASSWORD password'
  28.  
  29. /* This will be set if Autostart option is used or if the user selected */
  30. /* OK & start in the edit window. Should be in every edit script. */
  31. IF DoStart THEN START ID
  32.