I'd like to be able to log in my computer through Apple Remote Desktop (SSH) by running a script while the remote computer is running the loginWindow.
An ideal script would automate the process of selecting the "Other..." tile (see pic1), and then insert username and password fields, and finally press the submit button (see pic2).
Based on what I've found on the web, I came up with the following solution which meant to perform the last 2 steps only(2 and 3) while I'm already pressed the "Other..." tile manually and I'm on the second screen :
set username_ to "myself"
set password_ to "mypass"
tell application "System Events"
tell process "SecurityAgent"
get properties
if exists (text field 1 of window 1) then
set value of text field 1 of window 1 to username_
set value of text field 2 of window 1 to password_
end if
click button "Allow" of group 1 of window 1
end tell
end tell
however, I'm getting the following error :
/tmp/my.scpt:119:129: execution error: An error of type -610 has occurred. (-610)
Perhaps anybody can help me fix my script, or how to debug it properly ?