Last active
January 17, 2017 14:55
-
-
Save yukirii/8dee45581fa86b8a36cbea33e1893fcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on isRunning(appName) | |
tell application "Finder" to activate | |
tell application "System Events" to tell process "Finder" to (name of windows) contains appName | |
end isRunning | |
on closeDialog(appName) | |
tell application "System Events" | |
tell process "Finder" | |
click button "OK" of window appName | |
end tell | |
end tell | |
end closeDialog | |
set appName to "Cisco AnyConnect Secure Mobility Client" | |
try | |
if isRunning(appName) then | |
closeDialog(appName) | |
delay 0.5 | |
closeDialog(appName) | |
end if | |
end try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment