• 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: Problem saving a new file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem saving a new file


  • Subject: Re: Problem saving a new file
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 23 Oct 2012 02:18:44 -0500

On Oct 22, 2012, at 17:52, Axel Luttgens <email@hidden> wrote:
tell application "TextEdit"
tell (make new document with properties {path:"/Users/ericrobertson/Documents/New Notes.rtf"})
set its text to "This is sample text"
save
end tell
end tell
--> An error pops in TextEdit: Document « New Notes.rtf » could not be saved. You aren't allowed.

This indeed suggests that sandboxing is at work, but also that TextEdit probably isn't supposed to work that way. 
______________________________________________________________________

Hey Axel,

This works perfectly well in TextEdit 1.6 (not sandboxed) but fails in 1.7.1 and 1.8.

tell application "TextEdit"
  tell (make new document with properties {path:"/Users/chris/Documents/New Notes.rtf", text:"This is sample text"})
    save
  end tell
end tell

So it used to work that way but no longer does.

--
Take Care,
Chris

 _______________________________________________
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

  • Follow-Ups:
    • Re: Problem saving a new file
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: Problem saving a new file (From: Eric Robertson <email@hidden>)
 >Re: Problem saving a new file (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: TID & text items issue
  • Next by Date: Re: Problem saving a new file
  • Previous by thread: Re: Scripts and sansboxing (was: Re: Problem saving a new file)
  • Next by thread: Re: Problem saving a new file
  • Index(es):
    • Date
    • Thread