home *** CD-ROM | disk | FTP | other *** search
/ El Mac 1 / Magazine.iso / EL MAC 1 / Shareware / Utilities / NetStripper / Scripting Examples / NetStripper Example Script.text < prev    next >
Encoding:
Text File  |  1995-09-23  |  923 b   |  22 lines  |  [TEXT/ToyS]

  1. -- Sample script using NetStripper.
  2. -- Copyright © 1995 Adam Lloyd, but feel free to use this for your own purposes.
  3.  
  4. -- First of all, get hold of a text file from the user.
  5. -- We'll use a standard get file box to do this.
  6. global theTextFile -- the file we will be getting will be stored here
  7.  
  8. copy (choose file of type "TEXT") to theTextFile -- ask the user to select a text file
  9.  
  10. -- Now we actually tell NetStripper to convert that particular file into a DOS file.
  11. tell application "NetStripper v2.0"
  12.     activate -- we want to see the translation in progress
  13.     Mac To DOS theTextFile -- do the conversion
  14.     quit -- quit from NetStripper (this won't happen automatically)
  15. end tell
  16.  
  17. -- Now we'll show the text file using SimpleText. This will let you see the little boxes
  18. -- that characterise a DOS text file.
  19. tell application "SimpleText"
  20.     open theTextFile
  21.     activate -- activate SimpleText so we can see the text file
  22. end tell