on run {}
with timeout of 600 seconds
myHandler()
end timeout
end run
and a step in myHandler() then takes more than 60 seconds (the default timeout limit) the script is interrupted. Why doesn’t the handler inherit the environment it is called from? Can this be changed?
You can use a with timeout statement to control how long AppleScript waits for a command to execute before timing out. By default, when an application fails to respond to a command, AppleScript waits for two minutes before reporting an error and halting execution.