• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: No permission to save file dialog in OS X Lion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: No permission to save file dialog in OS X Lion (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Preferred AS editing tools
  • Next by Date: Re: No permission to save file dialog in OS X Lion
  • Previous by thread: Re: No permission to save file dialog in OS X Lion
  • Next by thread: Re: No permission to save file dialog in OS X Lion
  • Index(es):
    • Date
    • Thread