• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scrpting Script Editor (save as script)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scrpting Script Editor (save as script)


  • Subject: Re: scrpting Script Editor (save as script)
  • From: Ed Stockly <email@hidden>
  • Date: Sat, 12 Jan 2008 17:20:09 -0800

Script Editor seems to behave oddly when compiling and saving scripts.

If you have a script in script editor that won't compile, and run this script, you get an error message in the script editor User Interface.

If you clear that error, and run this script again, without fixing the script in Script Editor, the script saves as a "Script", but it's not compiled,

Very odd.

I would recommend using the compile command before saving. It returns an Apple Event error if the script can't be compiled. 

set newDocumentpath to (path to desktop as string) & "testName"
tell application "Script Editor"
-- compile document 1
save document 1 in file newDocumentpath as "Script"
end tell

HTH,

ES
=
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: scrpting Script Editor (save as script)
  • Next by Date: Can one detect that a javascript finished/is there a method to open 3D Object textures in Photoshop Extended/can I run Photoshop in background mode?
  • Previous by thread: Re: scrpting Script Editor (save as script)
  • Next by thread: [ANN] Smart Folder Targeteer (for Leopard)
  • Index(es):
    • Date
    • Thread