Re: applescript-users digest, Vol 2 #614 - 15 msgs
Re: applescript-users digest, Vol 2 #614 - 15 msgs
- Subject: Re: applescript-users digest, Vol 2 #614 - 15 msgs
- From: "Neal A. Crocker" <email@hidden>
- Date: Sun, 22 Apr 2001 22:50:07 -0500
Date: Sat, 21 Apr 2001 13:14:10 -0400
Subject: Handlers in list
From: "Stephen Swift (aka Burnum)" <email@hidden>
To: AppleScript <email@hidden>
<snip>
...but when I have
a list of handlers, all the handlers activate. I suppose I could use if
then statements if all else fails. Any Ideas? Thanks.
<snip>
set someList to {handler1(), handler2(), handler3(), handler4()}
This line actuall executes each handler and puts the results in a list.
Instead, do this:
Code:
on RunHand() -- ********!!!!!!!!! this empty handler is important.
Don't neglect it.
end
set DlgResult to {null,null,null,null,null,null,false,true,false,false}
set someList to {handler1, handler2, handler3, handler4} --
********!!!!!!!!! This is different from your script
set Num to 1
repeat with i from 7 to 10
if item i of DlgResult = true then
set RunHand to item Num of someList
end if
set Num to Num + 1
end repeat
RunHand() -- ********!!!!!!!!! This is different from your script