Skip to content

Instantly share code, notes, and snippets.

@zxjinn
Created February 20, 2015 16:30
Show Gist options
  • Save zxjinn/a1f3c873f86cf24889fa to your computer and use it in GitHub Desktop.
Save zxjinn/a1f3c873f86cf24889fa to your computer and use it in GitHub Desktop.
AppleScript that pastes Symantec VIP code (used in Alfred Workflow)
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
@zxjinn
Copy link
Author

zxjinn commented Mar 5, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment