Changed 2/18/18, 1:43 PST
I tried the script below and the problem was in fact handled. A dialog was generated saying ““hold 2.applescript” is currently running. Do you want to stop the script and close the window?” So never mind.
tell application "Script Debugger"
repeat 10 times
run script "quit"
delay 1
end repeat
end tell
Mark,
Is the script below something you want to successfully complete in a script debugger window?
tell application "Script Debugger"
run script "quit"
set TheResponse to display dialog "Test." buttons {"OK"} default button "OK"
end tell
When I run the script below I get an error dialog saying “AppleScript Execution Error Script Debugger got an error: A running script is not permitted to quit Script Debugger.”
tell application "Script Debugger"
quit
set TheResponse to display dialog "Test." buttons {"OK"} default button "OK"
end tell
It seems if the first script is prevented from executing, the second script should also be prevented from executing, since they do the same thing in the end. It does seem like it might be able to crash script debugger with the right script, even though I haven’t found a way to crash SD with using run script “quit”.
But it is also also true that it’s impossible to create a code parser that can determine, for all possible scripts, if any particular script would quit SD while Script Debugger is running a script. This is shown by the “halting problem.” So perhaps this is a potential problem with no good way to resolve in the general case.
However the script below
tell application "Script Debugger"
repeat 10 times
run script "quit"
delay 1
end repeat
end tell
Bill