How is the best way to ask applescript if a variable is undefined?
Is it just to do:
try
if x="" then
end if
on error
display dialog "no x!"
end try
??
thank you.
How is the best way to ask applescript if a variable is undefined?
Is it just to do:
try
if x="" then
end if
on error
display dialog "no x!"
end try
??
thank you.
You can’t test for the existence of a variable, as far as I know. I would simply try/end try:
try
x
on error
--> x undefined
end try
ah ok… Thank you very much.