home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / System7 tools / AppleScript / Script Tools / Examples / Choose New File Example < prev    next >
Encoding:
Text File  |  1993-06-17  |  468 b   |  16 lines  |  [TEXT/ToyS]

  1. set folderOK to true
  2. try
  3.     set newFile to ¬
  4.         choose new file with prompt "Please select an new archive file:" ¬
  5.             default name "Testing"
  6. on error errText number errNum
  7.     display dialog "Choose new file canceled" buttons {"OK"} default button {"OK"}
  8.     set folderOK to false
  9. end try
  10.  
  11. if folderOK then
  12.     display dialog "Selected new file: “" & (folder returned of newFile as string) & (¬
  13.         name returned of newFile) & "”" ¬
  14.         buttons {"OK"} ¬
  15.         default button {"OK"}
  16. end if