문제

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"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top