Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.7: Script the Login window through Apple Remote Desktop (updated for lion)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.7: Script the Login window through Apple Remote Desktop (updated for lion)
Authored by: ecwh73 on Sep 06, '11 01:11:12PM

if [[ "$(who | grep console)" == "" ]]; then # Runs ONLY if no one is logged in
touch /var/db/.AccessibilityAPIEnabled

osascript <<EOT

set username_ to "localadmin"
set password_ to "localpass"

tell application "System Events"
key code 125 -- Down Arrow
key code 125 -- Down Arrow
delay 1
key code 125 -- Down Arrow
key code 125 -- Down Arrow
tell process "SecurityAgent"
set value of text field 1 of window "Login" to password_
set value of text field 2 of window "Login" to username_
delay 0.5
key code 36 -- Return
delay 0.5
key code 36 -- Return
end tell
end tell
EOT
fi



[ Reply to This | # ]
10.7: Script the Login window through Apple Remote Desktop (updated for lion)
Authored by: applebit on Mar 08, '12 01:30:38PM

does this mean you found a solution? Because it appears for me that 10.7 is also broke and I cannot get it to work.

---
Jon McCullough
Systems Support Specialist



[ Reply to This | # ]