home *** CD-ROM | disk | FTP | other *** search
/ Corel Draw 6 / corel-draw-6-cd1.iso / scripts / dos.csc < prev    next >
Text File  |  1995-08-18  |  885b  |  29 lines

  1. REM Generates a text file Using file I/O functions
  2. REM Dos.csc MAY 24, 1995
  3. REM The text file is C:\scripts.txt. You can delete it after this runs.
  4.  
  5. DIM mess$(5)
  6.  
  7. CURRFOLDER = "C:\"
  8. mess(1) = "As you can see, you can create a text file with almost anything inside of it"
  9. mess(2) = CHR(32) + "Using the CHR function, you can insert special characters"
  10. mess(3) = CHR(32) + "Like tabs,"+CHR(9)+"and carriage returns."
  11. mess(4) = CHR(32) + "As this file illustrates, this ability can be used to generate"
  12. mess(5) = CHR(32) + "Reports for a given macro. User input can be output in such a way."
  13.  
  14. OPEN "C:\scripts.txt" FOR OUTPUT AS #2
  15.  
  16. PRINT #2, "This is test#1", CHR(9), "This is still test#1"
  17.  
  18. PRINT #2, "You entered ", INPUTBOX("Please enter some text")
  19.  
  20. FOR i% = 1 TO 20
  21.     PRINT #2, "This is test #3"
  22. NEXT i
  23.  
  24. FOR j% = 1 TO 5
  25.     PRINT #2, mess(j)
  26. NEXT j
  27. CLOSE 2
  28.  
  29.