• 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: TextEdit Save Problem (Thomas Maffucci)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextEdit Save Problem (Thomas Maffucci)


  • Subject: Re: TextEdit Save Problem (Thomas Maffucci)
  • From: Axel Luttgens <email@hidden>
  • Date: Sat, 26 Jan 2013 00:13:27 +0100

Le 24 janv. 2013 à 23:50, koenig.yvan a écrit :

>
> Le 24/01/2013 à 22:55, Christopher Stone a écrit :
>
>> [...]
>> Whups.  I forgot to switch to TextEdit 1.8 from 1.6 (which I use on my machine).
>>
>> This should work with 1.8.
>>
>> tell application "TextEdit"
>> 	set newFile to ((path to desktop folder as text) & "New_File.rtf") as «class furl»
>> 	set _text to "Here is some sample text."
>> 	set newDoc to make new document with properties {text:_text}
>> 	save newDoc in newFile
>> end tell
>> [...]
>
> Right, this late one works.

Well, yes and no...

Remember, from the thread pointed at by Christopher the other day (http://lists.apple.com/archives/applescript-users/2012/Oct/msg00109.html), let's try this one:

	tell application "TextEdit"
		path to documents folder
	end tell

May be the expected result. Or not. ;-)

Moreover, again from that same thread, the above may be made somewhat less esoteric:

	set newFile to POSIX file (POSIX path of (path to desktop folder) & "New_File.rtf")
	tell application "TextEdit"
		set _text to "Here is some sample text."
		set newDoc to make new document with properties {text:_text}
		save newDoc in newFile
	end tell

Axel


 _______________________________________________
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: 
 >TextEdit Save Problem (Thomas Maffucci) (From: Thomas Maffucci <email@hidden>)
 >Re: TextEdit Save Problem (Thomas Maffucci) (From: Christopher Stone <email@hidden>)
 >Re: TextEdit Save Problem (Thomas Maffucci) (From: "koenig.yvan" <email@hidden>)
 >Re: TextEdit Save Problem (Thomas Maffucci) (From: Christopher Stone <email@hidden>)
 >Re: TextEdit Save Problem (Thomas Maffucci) (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: Writing Mailbox Behaviors
  • Next by Date: appIsRunning(appName) not showing with filemaker
  • Previous by thread: Re: TextEdit Save Problem (Thomas Maffucci)
  • Next by thread: Fwd: TextEdit Save Problem (Thomas Maffucci)
  • Index(es):
    • Date
    • Thread