Re: Problem Scripting the Script Editor
Re: Problem Scripting the Script Editor
- Subject: Re: Problem Scripting the Script Editor
- From: Dave <email@hidden>
- Date: Wed, 1 Oct 2008 10:08:29 +0100
Hi,
Thanks a lot, got it working now!
All the Best
Dave
On 30 Sep 2008, at 20:27, Luther Fuller wrote:
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