• 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: Problem Scripting the Script Editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem Scripting the Script Editor


  • Subject: Re: Problem Scripting the Script Editor
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 30 Sep 2008 14:27:30 -0500

On Sep 30, 2008, at 1:14 PM, Dave wrote:

Hi All,

I'm having problems scripting the Script Editor, Please see following script:

tell application "Script Editor"
set myWindow to make new document
set myText to "on run" & return & "beep" & return & "end run" & return
set the text of myWindow to myText
compile myWindow

save myWindow as "application" in "/Users/Dave/Test1.app" without runonly and startup screen
end tell


This creates a new window, add the text correctly, compiles it ok, but does not save the file as an application as expected. I don't get an error message or any indication that the save didn't work, just no Test1.app file at the end of it!

What am I doing wrong?

I have a script that saves as application from Script Editor. I've removed many lines not applicable to your question.

set objectRef to (POSIX path of tempRef) & projectName & ".app" as POSIX file
set filetype to "application bundle" as Unicode text
...
...
tell application "Script Editor"
launch
...
...
set docRef to a reference to first document
if |stayOpen| of projectParams then
save docRef in objectRef as filetype with run only and stay open without startup screen
else
save docRef in objectRef as filetype with run only without stay open and startup screen
end if


Does it help? Perhaps I should explain more?

_______________________________________________
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
References: 
 >Problem Scripting the Script Editor (From: Dave <email@hidden>)

  • Prev by Date: Re: Problem Scripting the Script Editor
  • Next by Date: Re: AppleScript-Users Digest, Vol 5, Issue 540
  • Previous by thread: Re: Problem Scripting the Script Editor
  • Next by thread: Re: Problem Scripting the Script Editor
  • Index(es):
    • Date
    • Thread