Re: Problem Scripting the Script Editor
Re: Problem Scripting the Script Editor
- Subject: Re: Problem Scripting the Script Editor
- From: Emile SCHWARZ <email@hidden>
- Date: Wed, 1 Oct 2008 08:45:49 +0200 (CEST)
Hi Dave,
The following works fine here:
tell application "Script Editor"
tell application "Finder"
set myAppPrefix to ("Data: AppleScript:Comic Book Scripts:" as alias)
end tell
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
set appTarget to (myAppPrefix as text) & "Test1.app"
save myWindow as "application" in appTarget without run only and startup screen
end tell
WARNING: beware of the mail line wrap
do not forget to replace the prefix I use by yours (line that starts with "set myAppPrefix to "
something like:
"Boot:Users:Dave:"
In my boot hard disk, the "Users" folder name is "Utilisateurs"...
HTH,
Emile
Original question:
-----------------------------------------------------------------------
Date: Tue, 30 Sep 2008 19:14:45 +0100
From: Dave <email@hidden>
Subject: Problem Scripting the Script Editor
To: asu Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
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!
_______________________________________________
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