home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / telecomm / storm100 / olt.bas < prev    next >
BASIC Source File  |  1993-11-03  |  812b  |  28 lines

  1. ' Script to go to Online Today and determine how many articles are
  2. ' available to read and only read those articles.
  3. TERM OFF 
  4. CAPTURE OFF 
  5. SEND "go olt-90"
  6. WAIT 30,"OLT-90":' appears at top of screen
  7. IF WAIT(0) = 0 THEN Fail:' Give up
  8. WAIT 30,"!":' actual prompt
  9. IF WAIT(0) = 0 THEN Fail:' Give up
  10. FAST ON 
  11. FOR x = CSRLIN - 1 TO 1 STEP -1:' search for string on screen
  12.     a$ = LTRIM$( SCREEN$(x)):' strip leading spaces
  13. IF INSTR(a$,"Late News") THEN n = VAL(a$):GOTO Doit:' pick up menu item #
  14. NEXT x
  15. GOTO Fail
  16. Doit:IF n <= 2 THEN SEND "Scroll all" ELSE SEND "Scroll 1-";n - 1
  17. CAPTURE ON 
  18. WAIT 180,"!"
  19. IF WAIT(0) = 0 THEN Fail
  20. SEND :' send CR
  21. WAIT 100,"OLT-90":' in case a '!' was imbedded in an article
  22. CAPTURE OFF 
  23. FAST OFF 
  24. END 
  25. Fail:PRINT "Script failed":CAPTURE OFF :END 
  26.