-
-
Save zxjinn/a1f3c873f86cf24889fa to your computer and use it in GitHub Desktop.
AppleScript that pastes Symantec VIP code (used in Alfred Workflow)
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
to getCurrentApp() | |
return (path to frontmost application as text) | |
end getCurrentApp | |
on processCheck() | |
tell application "System Events" to get name of every process | |
if the result contains "VIP Access" then | |
activate application "VIP Access" | |
else | |
processCheck() | |
end if | |
end processCheck | |
set originalApp to my getCurrentApp() | |
activate application "VIP Access" | |
processCheck() | |
tell application "System Events" to tell process "VIP Access" | |
click menu item "Copy Security Code" of menu 1 of menu bar item "VIP Access" of menu bar 1 | |
end tell | |
activate application originalApp | |
tell application "System Events" | |
keystroke "v" using command down | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This looks like a much better way to do it, as it doesn't require the GUI at all
https://gist.github.com/p120ph37/8213727