• 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: convert a script to 10.9
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >convert a script to 10.9 (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: path to applications folder in 10.9
  • Next by Date: Re: path to applications folder in 10.9
  • Previous by thread: convert a script to 10.9
  • Next by thread: ASEditor Drag&Drop
  • Index(es):
    • Date
    • Thread