Screen Sharing with Applescript and Automator
<p>Desired Results:
1. Open Screen Sharing.app
2. Input desired IP address and connect (changes depending on environment)
3. Auto Mute Microphone
4. Wait for session to connect
5. Auto switch to Observe Mode
6. Session is complete and Screen Sharing.app is closed
7. Auto UnMute Microphone</p>

<p>What's been done and needs:
 1. I have successfully done steps 1, 2, 3, 6, and 7.
 2. I am stuck trying to find a way to trigger the Observe Mode without using a timer. If the desired connection isn't complete within the designated time or the window is not selected, it will not work and an error will occur.
 3. I am using a combination of Automator and Applescript. Most of the items are setup by Applescript.</p>

<p>My question:
How can I tell Automator or Applescript to wait for Screen Sharing to finish connecting before proceeding with the remaining tasks?</p>