Re: Double Tell - Tell by Variable Question
Re: Double Tell - Tell by Variable Question
- Subject: Re: Double Tell - Tell by Variable Question
- From: Shane Stanley <email@hidden>
- Date: Fri, 26 Jun 2015 23:08:55 +1000
On 26 Jun 2015, at 9:00 pm, Dave <email@hidden> wrote:
>
> Thanks, the way I’d envisaged it is that the “targets” would be a suite of Apps - like CS6/5/4/3 or MS Office etc.
They all need different code.
>
> In this case, the script code is included in a XCode project as a .applescript file. So, I take XCode does the compilation of the Script?
Yes, it gets compiled when you build, and the compiled scripts are loaded when the app runs.
> If so, then if it were possible to specify in the build or other setting where to get the terms from, something like this perhaps:
>
>
> script MyASClass
> property parent : class "NSObject"
> property usingTermsFrom : class {"Adobe Illustrator”,"Adobe Photoshop”,"Adobe Indesign”}
>
> What do you think?
You can do something like that with "use" statements: so you'd have 'use application "Adobe Illustrator"', etc, etc. But although that satisfies your requirements, it's probably going to buy you a whole lot more hurt when terms are ambiguous because they appear in more than one app's dictionary and have different underlying codes.
The code that talks to Illustrator is only going to work with Illustrator, so what's the objection to wrapping it in 'tell application "Illustrator"'? Same with the other apps' code. You're trying to avoid doing something that isn't really a problem.
--
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