HELP (noob): Telling a dialogue what to do with a script...

I am attempting to make a script which will allow me to login and out of my schools VNC and in doing so have it “as much in the background as possible”

So far I have made great progress, but when I quit out of the VNC client, a dialogue box comes up, and asks “quit and disconnect” in the non-hi-lighted box and “cancel” in the default box.

Is there a way for me to make Applescript recognize this window, bring it to the front (it defaults in non-activation made, rendering a simple keystroke escape function impossible) and have applescript choose the “quit and disconnect” option?

Thanks for your help…

Most likely yes. What is the name of the VNC client? I’m not the most skilled at GUI scripting so I would have to install a copy and take a look.

thanks for the reply. I went ahead, and called forward the window which offers a disconect, and had the script choose that button…

After this I quit, so there is no more need for the button pushing…

However, I still need to figure out how to hide the app without the option of using “command-h” if you have any ideas here, it’d be great.