Guest User

Untitled

a guest
Oct 19th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. tell application "Pomodoro One"
  2. activate
  3. end tell
  4. tell application "System Events"
  5. tell UI element "Pomodoro One"
  6. tell menu bar item 1 of menu bar 2
  7. click menu item 1 of menu 1
  8. end tell
  9. end tell
  10. end tell
  11.  
  12. System Events got an error: Can’t get menu 1 of menu bar item 1 of menu bar 2 of UI element "Pomodoro One". Invalid index.
  13.  
  14. ignoring application responses
  15. tell application "System Events" to tell process "Pomodoro One"
  16. click menu bar item 1 of menu bar 2
  17. end tell
  18. end ignoring
  19. do shell script "killall System\ Events"
  20. delay 0.1
  21. tell application "System Events" to tell process "Pomodoro One"
  22. tell menu bar item 1 of menu bar 2
  23. click menu item "Start Pomodoro" of menu 1
  24. end tell
  25. end tell
  26.  
  27. ignoring application responses
  28. tell application "System Events"
  29. click menu bar item 1 of menu bar 1 of application process "Pomodoro One"
  30. end tell
  31. end ignoring
  32. do shell script "killall System\ Events"
  33. delay 0.1
  34. tell application "System Events"
  35. click menu item "Start Pomodoro" of menu 1 of menu bar item 1 of menu bar 1 of application process "Pomodoro One"
  36. end tell
Add Comment
Please, Sign In to add comment