Last active
June 11, 2017 01:35
-
-
Save alloydwhitlock/9216519 to your computer and use it in GitHub Desktop.
Copy RSA Token Script for Mac (Automator + Applescript)
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
-- These are two separate Applescripts that can be executed within an automator workflow. Create a new workflow, create two “run applescript” actions, and paste them. This script will copy the RSA token, set your PIN, and paste it. If you don’t want the pin copied, remove the two lines with “pin” in the second applescript. There are instructions online about setting workflows as services which can be called via key commands. | |
-- You can set the “terminalapp” to whichever app you use (I use iTerm) and the “pin” to your PIN. | |
on run {input, parameters} | |
set terminalapp to "iTerm" | |
set pin to "6666" | |
tell application "SecurID" | |
activate | |
tell application "System Events" | |
keystroke "c" using {command down} | |
end tell | |
end tell | |
tell application terminalapp | |
activate | |
tell application "System Events" | |
keystroke pin | |
keystroke "v" using {command down} | |
keystroke return | |
end tell | |
end tell | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment