Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement