I have an Applescript in which I wish to set the value of the text fields Name and Password of a window belonging to the process SecurityAgent.
It is similar to the following:
tell window "Authenticate" of process "SecurityAgent"
tell group 1
set value of text field 1 to "king"
set value of text field 2 to "king1"
end tell
click button "OK" of group 2
end tell
While my script is also referring to the process SecurityAgent, the window in question is the one that pops up when you shut down OS X, and another user is logged in. The SecurityAgent window pops up asking for the administrator username and password in order to complete the shut down process. I do not know how to refer to the text fields in said window.
My question is, how do I find out the name of these text fields, the group they belong to, and the window they belong to? Is there a method of mapping OS X windows so I can refer to them in the AppleScript? I can't seem to find information concerning this anywhere.
