Does AppleScript support some kind of switch/case-statement? If not, what is the recommended way to do something like this:
if URL contains "A" then
--code
else if URL contains "B" then
--code
else if URL contains "C" then
--
else
log ("error")
Does AppleScript support some kind of switch/case-statement? If not, what is the recommended way to do something like this:
if URL contains "A" then
--code
else if URL contains "B" then
--code
else if URL contains "C" then
--
else
log ("error")
That is exactly the recommended way! The final else can be omitted if there is no default case. It must end with an end if
Objective-C can handle switch cases but with integers only. Not strings.
Iām not sure you bridge AsObj-C with switch statements. They seem to be a C++ function