My build keeps generating weird error messages for nothing. It (occasionally) chokes on simple tasks like -
tell window 1
set alpha value to 0.0
repeat 10 times
set alpha value to (alpha value + 0.1)
delay 0.1
end repeat
end tell
giving me “Applescript error -1762” (apparently the delay is the culprit, how silly!). The script works just fine when run externally, so I know the error is not in the code itself. Cleaning the build doesn’t help.
However, the errors don’t prevent my app from working, the script keeps running without problems. So, if I can’t fix what isn’t broken, I figured a solution would be to disable the error alerts, but I can’t find anything in the docs on how to do this. Is it even possible?
Try blocks don’t help. The error alerts are displayed in any case. But even if they did, it wouldn’t be a good solution since the repeat loop would never be completed, leaving me with an invisible window…