I'm new to applescript and is currently stuck in access the prompt window asking for my password.
I'm creating a launcher for my daily use application and i want to automate the launching process.
Right now, I'm only launching two application, VirtualHostX and MAMP. Later I might add few some.
Here's what I done so far:
tell application "VirtualHostX" to activate
tell application "MAMP" to activate
tell application "System Events"
tell process "VirtualHostX"
tell menu bar 1
tell menu bar item "Web Server"
tell menu 1
click menu item "Start"
end tell
end tell
end tell
end tell
end tell
When launching, It will launch the two application successfully, but Virtual Host will ask me for my password for authorization. I want to integrate entering my password in the flow or code. I already tried to google for answer but failed to find a solution for it.
I can't seem to target that window and enter my password.
Let me know what am I missing.
Thank You.
Password dialogs are shown by SecurityAgent:
tell application "System Events" to tell process "SecurityAgent"
set value of text field 2 of scroll area 1 of group 1 of window 1 to "password"
click button 2 of group 2 of window 1
end tell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With