Re: No permission to save file dialog in OS X Lion
Re: No permission to save file dialog in OS X Lion
- Subject: Re: No permission to save file dialog in OS X Lion
- From: Shane Stanley <email@hidden>
- Date: Fri, 29 Jul 2011 11:04:04 +1000
- Thread-topic: No permission to save file dialog in OS X Lion
On 29/7/11 10:46 AM, "Brian Christmas" <email@hidden> wrote:
> You'll need to use something like this in the GUI
The trouble with all this GUI scripting stuff is that you probably have to
write it all again next time the UI is tweaked. Or even when you move to a
different computer, and the delays need to be changed.
If it's just a text file, you can just remove TextEdit from the picture:
tell application "TextEdit"
tell document 1
set theText to text 1 -- get the text
set thePath to path -- POSIX path
close saving no
end tell
end tell
set fileRef to (open for access thePath with write permission)
write theText to fileRef as «class utf8»
close access fileRef
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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