Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. on isRunning(appName)
  2. tell application "Finder" to activate
  3. tell application "System Events" to tell process "Finder" to (name of windows) contains appName
  4. end isRunning
  5.  
  6. on closeDialog(appName)
  7. tell application "System Events"
  8. tell process "Finder"
  9. click button "OK" of window appName
  10. end tell
  11. end tell
  12. end closeDialog
  13.  
  14. set appName to "Cisco AnyConnect Secure Mobility Client"
  15.  
  16. try
  17. if isRunning(appName) then
  18. closeDialog(appName)
  19. delay 0.5
  20. closeDialog(appName)
  21. end if
  22. end try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement