title: How to enter password for prompt windows using applescript
body: <p>I'm new to applescript and is currently stuck in access the prompt window asking for my password. </p>
  
  <p>I'm creating a launcher for my daily use application and i want to automate the launching process.</p>
  
  <p>Right now, I'm only launching two application, VirtualHostX and MAMP. Later I might add few some.</p>
  
  <p>Here's what I done so far:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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. </p>
  
  <p>I can't seem to target that window and enter my password.
  <img src="https://i.stack.imgur.com/XgvjG.png" alt="enter image description here"></p>
  
  <p>Let me know what am I missing.</p>
  
  <p>Thank You.</p>