hey folks, just a quick question. Is there a switch statement (replacing else/if) in applescript. If so what is the syntax?
thanks a bunch
matt
hey folks, just a quick question. Is there a switch statement (replacing else/if) in applescript. If so what is the syntax?
thanks a bunch
matt
Do you mean “switch” as in javascript? I think the most similar function is a simple if/end-if structure:
if dog is "black" then
say "True"
else if dog is "pink" then
say "Pig"
else
say "Huh?"
end if
You can create more complex structures, but this will do the job most of times.
yeah, I was hoping for something like:
switch (choice)
case 1:
doFirst()
break
case 2:
doSecond()
break
case 3:
doThird()
break
default:
doOther()
break
end switch
for AS, but I guess that isn’t an option. It’s not a big thing, just a nice thing, I can deal w/ else/ifs.
thanks
matt
I am trying to create a script to paste text into a Golive document. Then I can quickly insert these text codes with speech. I can’t. Anyone with experience in scripting and golive that might sugges ta solution. Thanks
IS