Re: Getting Script Editor to save a new document without closing it?
Re: Getting Script Editor to save a new document without closing it?
- Subject: Re: Getting Script Editor to save a new document without closing it?
- From: Adam Bell <email@hidden>
- Date: Tue, 14 Nov 2006 10:20:54 -0400
Title: Re: Getting Script Editor to save a new document
without c
With respect to the original request, this works:
on newScriptEditorDoc(scriptText)
tell application "Script Editor"
activate
save (make new document with properties {name:"Test 1", text:scriptText})
as
("script"
as Unicode
text) in ((path to
desktop folder as text) &
"Test 1")
end
tell
end newScriptEditorDoc
set b to
newScriptEditorDoc("tell app \"system preferences\" to
activate")
At 8:06 PM +0000 11/13/06, Brennan Young wrote:
What's going on here:
tell application "Script Editor"
activate
tell (make new document)
save it in (choose file name)
return its path
end tell
end tell
The document gets created, and saved, but Script Editor still
thinks
it's called "Untitled X", and its path is not getting set.
(Nothing is
returned from this script). 'Command-S' brings up the 'Save' dialog
box
prompting me to choose a name, which is really not what I want to
happen.
This seems to be a bug.
Do I really have to close the document and open it again to work
around it?
I've also had difficulty
1) setting the text of a script in script editor.
2) saving a script 'as' something (.scpt, .app, .txt or whatever).
Seems fairly poor if 'Script Editor' has such flaky Scripting
support.
What's the deal here? Have I missed something?
Brennan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>esscable.net
Archives:
http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden