Hello Pro Scripters
I have a very basic apple script that just invokes a uninstaller enters the password and hits the enter key
as below
tell application "<Our Custom Uninstaller for App>"
reopen
activate
tell application "System Events"
delay 5
keystroke "<I add my admin password here>"
delay 5
key code 36
end tell
delay 30
tell application "System Events"
key code 36
end tell
end tell
This is very crude script but it works fine if I trigger it from Apple Script Editor
But the moment I add this script into the shell script and then try to invoke this apple script the Focus on that uninstaller window is lost and password is typed on the terminal instead of application
Is there anyway i can get the focus back on the window.
From accessibility inspector i see the UI hiearchy as follows
SecurityAgent(Application)
- Untitled (standard window)
Uninstaller App wants to make changes (text)
Enter your password to allow this(text)
Admin (text field)
<empty description> (secure text field)