Re: scrpting Script Editor (save as script)
Re: scrpting Script Editor (save as script)
- Subject: Re: scrpting Script Editor (save as script)
- From: "Yvon Thoraval" <email@hidden>
- Date: Sat, 12 Jan 2008 10:09:19 +0100
2008/1/12, Axel Luttgens <email@hidden>:
On 12/01/08 8:58, Yvon Thoraval wrote:
> My goal :
>
>
> getting allways "NSReceiversCantHandleCommandScriptError" even if,
> before saving, the Finder makes the new file.
>
> here am i wrong ?
>
> the purpose being to save a *.applescript file in a "*.scpt" file...
Looks like one saves a window's document, not the window itself.
On the other hand, the as parameter is defined as a string.
So,
tell application "Script Editor" to save document of front window as
"script"
shoud be more compliant with SE's dictionary.
ok, fine thanks (i had both tried save as script and save as "script"...)
seems to work only with document however i needed to add :
save document of
front window as "script" in my
getAlias(aFile)
my getAlias
(aFile) making a new empty file with extension ".scpt" and returning it's alias...
if i read the Script Editor dictionnary, i get :
save v : Save an object.
save reference : the object for the command
[as Unicode text] : The file type in which to save the data. Use one of the following strings: "script", "application", "script bundle", "application bundle", "text".
[
in alias] : The file in which to save the object.
[run only boolean] : Should the script be saved as Run-Only? If it is, you will not be able to edit the contents of the script again. The default is not to save as run only. (Applies to all script types except for "text").
[
startup screen boolean] : Show the startup screen? The default is not to show the startup screen. (Only applies to scripts saved as "application" or "application bundle").
[
stay open boolean] : Should the application remain open after it is launched? The default is not to stay open. (Only applies to scripts saved as "application" or "application bundle").
[
in alias] is between [] does that means it's an option ???--
yvon
_______________________________________________
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