Created
August 27, 2013 21:34
-
-
Save nmcspadden/6359466 to your computer and use it in GitHub Desktop.
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
line_01='set logInUser to "USER"' | |
line_02='set logInPassword to "PASSWORD"' | |
line_03='tell application "System Events"' | |
line_04='tell application process "loginwindow"' | |
line_05='key code 53' | |
line_06='delay 1' | |
line_07='key code 125' | |
line_08='delay 1' | |
line_09='key code 36 using option down' | |
line_10='delay 1' | |
line_11='keystroke tab' | |
line_12='delay 1' | |
line_13='key code 117' | |
line_14='delay .5' | |
line_15='keystroke tab' | |
line_16='delay .5' | |
line_17='key code 117' | |
line_18='keystroke return' | |
line_19='delay 1' | |
line_20='keystroke tab' | |
line_21='delay .2' | |
line_22='repeat with aChar in characters of logInUser' | |
line_23='keystroke aChar' | |
line_24='delay 0.2' | |
line_25='end repeat' | |
line_26='keystroke tab' | |
line_27='delay .5' | |
line_28='repeat with aChar in characters of logInPassword' | |
line_29='keystroke aChar' | |
line_30='delay 0.2' | |
line_31='end repeat' | |
line_32='keystroke return' | |
line_33='delay 0.2' | |
line_34='keystroke return' | |
line_35='end tell' | |
line_36='end tell' | |
value=$(osascript -e "$line_01" -e "$line_02" -e "$line_03" -e "$line_04" -e "$line_05" -e "$line_06" -e "$line_07" -e "$line_08" -e "$line_09" -e "$line_10" -e "$line_11" -e "$line_12" -e "$line_13" -e "$line_14" -e "$line_15" -e "$line_16" -e "$line_17" -e "$line_18" -e "$line_19" -e "$line_20" -e "$line_21" -e "$line_22" -e "$line_23" -e "$line_24" -e "$line_25" -e "$line_26" -e "$line_27" -e "$line_28" -e "$line_29" -e "$line_30" -e "$line_31" -e "$line_32" -e "$line_33" -e "$line_34" -e "$line_34" -e "$line_35" -e "$line_36") # 53=escape,125=down,117=delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment