Re: Run Handler-Name from Text?
Re: Run Handler-Name from Text?
- Subject: Re: Run Handler-Name from Text?
- From: Emmanuel LEVY <email@hidden>
- Date: Tue, 17 Apr 2012 11:02:56 +0200
Look what we do, I don't know if it's relevant. That script should run different handlers depending on what "mission" it's given.
1. we store the handlers into a plist:
set thehandlers to PlistNew {missionone:get my handlerone, missiontwo:get my handlertwo, etc.}
2. then we retrieve the handler by key:
set my tmphandler to PlistGet thehandlers key themission
3. and we run it!
tmphandler(missiondata)
Best,
Emmanuel
quomodo.com
The CMS for 15,000
On Apr 17, 2012, at 10:47 AM, Christopher Stone wrote:
> On Apr 17, 2012, at 03:10, Thomas Fischer wrote:
>> Unfortunately, in this situation you can't use a variable with value "myCriterionB"
> ______________________________________________________________________
>
> Hey Thomas,
>
> Thanks. Unfortunately that's exactly what I'm wanting to do. :)
>
> I wonder if there's a way to coerce text to a handler using chevron class syntax.
>
> --
> Best Regards,
> Chris
>
> _______________________________________________
> 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
_______________________________________________
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