You can also try an on idle handler...
repeat until application "Google Chrome" is not running
-- insert your code
say "run"
delay 2
end repeat
say "quit"
문제
Normally in AppleScript it goes line by line and at the end it quits the script. Is there a way to make the script keep on running? This is the situation:
Via the AppleScript I am opening Google Chrome. This is fine. After opening it the AppleScript have to keep on running until Google Chrome is closed. When closed it needs to show a dialog that Google Chrome is closed and quit itself.
Is there a way to do this?
해결책
You can also try an on idle handler...
repeat until application "Google Chrome" is not running
-- insert your code
say "run"
delay 2
end repeat
say "quit"