Syntax check - else if

Hi Folks,

The Syntax is working but can you tell me (I am not able to test this) wheter the result I am expecting will be displayed:


if Q contains "one" then
try 
tell current application
display Dialog "ONE" buttons {"OK"} default button 1
quit the application
end tell
end try

else if Q contains "two" then
try 
tell current application
display Dialog "Two" buttons {"OK"} default button 1
quit the application
end tell
end try

else if Q contains "three" then
try 
tell current application
display Dialog "Three" buttons {"OK"} default button 1
quit the application
end tell
end try

else if Q does not contain "four" then
try 
tell current application
display Dialog "This is not 4" buttons {"OK"} default button 1
quit the application
end tell
end try

end if


If Q is 17 then it will display “This is not 4”? Am I right?

Thanks for your help…

Stefan

yes, this is o.k.

But I’m wondering why you are not able to test this.
You can paste snippets in a new editor window,
add a couple of set y to x lines to define the variables und run the script :wink:

Hi Stefan,

I have to appologize - the Brain was blocked… → I have tested it and came to the same result…

Sorry for stealing your time…

Best Regards,

STefan