Jump to content

proper exit when cancel is pressed


Recommended Posts

Seem pretty simple enough but I can do it properly. So here is the code first:

Local $ordi = InputBox( "VNCViewer - Script", "Entrez votre Addresse Ip ou le nom de hote")

Run( "C:\Program Files\UltraVNC\vncviewer.exe" & " " & $ordi & " " & "-password 1111")
If @error = 1 Then Exit; exit if cancel pressed

What happens: when script is started, I press cancel to exit the script but when I do, vnc pop's up.

What I want to happen: when cancel is pressed, it exits the script without opening vnc.

Again, any help will be appreciated.

Thanks guys

** Warning **Noobie ahead. handle with caution

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...