Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. on alfred_script(q)
  2. tell application "System Events"
  3. set frontmostProcess to first process where it is frontmost
  4. keystroke tab using command down
  5.  
  6. set mcount to 0
  7. repeat while (frontmostProcess is frontmost) and ((mcount) < 5)
  8. delay 0.2
  9. set mcount to mcount + 1
  10. end repeat
  11.  
  12. set secondFrontmost to name of first process where it is frontmost
  13. keystroke tab using command down
  14.  
  15. set mcount to 0
  16. repeat while (process secondFrontmost is frontmost) and ((mcount) < 5)
  17. delay 0.2
  18. set mcount to mcount + 1
  19. end repeat
  20.  
  21. perform action "AXRaise" of window 1 of process secondFrontmost
  22. end tell
  23. end alfred_script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement