I know this is probably really basic stuff but…
I want the user to pick from a list to carry out some actions - no problem.
But when I try to stop the script when ‘false’ is returned, ie the click ‘Cancel’ rather than ‘OK’ it doesn’t.
Any clues??
S
I know this is probably really basic stuff but…
I want the user to pick from a list to carry out some actions - no problem.
But when I try to stop the script when ‘false’ is returned, ie the click ‘Cancel’ rather than ‘OK’ it doesn’t.
Any clues??
S
Does this work?
set l to {1, 2, 3}
set r to (choose from list l)
if r is false then error number -128
display dialog r
– Rob
Rob
Nice thinking!!
Works a treat. Any news on Sal’s 1-2-3 book? I think I really need it!!
S
Glad it worked. I don’t know the status of Sal’s book but I’ve heard many good things about “AppleScript: The Definitive Guide”, by Matt Neuburg. It seems to be right up there with Danny Goodman’s “AppleScript Handbook” as a “must have” AppleScript reference.
– Rob