Re: Double Tell - Tell by Variable Question
Re: Double Tell - Tell by Variable Question
- Subject: Re: Double Tell - Tell by Variable Question
- From: Dave <email@hidden>
- Date: Fri, 26 Jun 2015 15:34:22 +0100
> On 26 Jun 2015, at 14:08, Shane Stanley <email@hidden> wrote:
>
> 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.
You’re right, there is no harm in it, I was just exploring possibilities really. The main problem I was trying to solve was if there were two versions of the same application installed.
For instance, say there was “BogglerMail” V1 and “BogglerMail” V2 installed. In this case, my app needs to handle “BogglerMail” V1 and V2, but only one instance is selected at install time, e.g. the user will be asked to choose which app they wish to target at install time. This will mean that the file paths (relative to the Application folder) will be different, depending on which one they select. But thinking it through now, it looks like I will have to have Script Handler Classes for both versions, e.g.
BogglerMailClassV1 and BigglerMailClassV2.
Anyway, thanks for the clarification.
All the Best
Dave
_______________________________________________
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