Re: Run Handler-Name from Text?
Re: Run Handler-Name from Text?
- Subject: Re: Run Handler-Name from Text?
- From: Shane Stanley <email@hidden>
- Date: Tue, 17 Apr 2012 13:14:27 +1000
On 17/04/2012, at 12:58 PM, Christopher Stone wrote:
> I currently have a very large nested if-structure, and I'm wanting something easier to read, sort, and maintain.
It must be long to bother dragging the overhead of sed et al into play!
I doubt that you'll get anything text based, but for a handler named myHandlerName(), AS treats the variable myHandlerName as the handler. So you could do something index-based like:
set x to {myHandlerName, myHandlerName2, ...}
run script (item n of x)
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <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