Re: convert a script to 10.9
Re: convert a script to 10.9
- Subject: Re: convert a script to 10.9
- From: Shane Stanley <email@hidden>
- Date: Mon, 28 Oct 2013 10:28:22 +1100
On 28 Oct 2013, at 1:08 AM, koenig.yvan <email@hidden> wrote:
> Is the need to use a hardcoded path a normal behavior ?
Yes. You can't use a variable for the application name on a "tell application..." block because your script editor needs to know it at *compile* time, to know where to get the terminology from. (Or you could use a "using terms from..." block, or a "use ..." statement -- one way of another, the editor has to know where to get the terminology used in the block.)
> On my side I believed that it's not because when I try to drive the application's cousin Pages, I may code :
>
> set Pages09 to (path to applications folder as text) & "iWork '09:Pages.app"
> tell application Pages09 to tell document 1
> count paragraphs
> end tell
That works because the only terminology you are using in that block also belongs to AppleScript. Try asking for something specific to Pages and see how you get on.
--
Shane Stanley <email@hidden>
<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