Re: Set Contents not working
Re: Set Contents not working
- Subject: Re: Set Contents not working
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 14 Nov 2005 16:56:59 -0500
- Thread-topic: Set Contents not working
on 2005-11-14 12:14 PM, Ted at email@hidden wrote:
> tell application "TextEdit"
> make new document
> set the contents of front document to "Database report on " &
> dName & return & return
> I'm getting the following error in Script Editor:
>
> "TextEdit got an error: Can't make contents of document 1 into type
> reference."
In TextEdit and many other modern apps, you have to say 'set text of front
document to "XXX"'.
Every application is a little different. To get a script right, you
generally have to read the app's terminology dictionary (which isn't always
terribly informative) and use trial-and-error until it works.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden