Jump to content

(SOLVED) ControlClick


Recommended Posts

I know this looks a little fishy, but I own a support site and I will be offering VNC Services to individuals seeking help. (For free)

For some weird reason, the below script works perfectly on machines that already have VNC installed, but for those that don't already have it installed it prompts to "Exit VNC Installation". I know there are more complex ways to accomplish this, I was just trying to keep it simple, and I guess that was my mistake. I'm not done, as I plan on checking for VNC to be installed and started before going through with the install. I did search the forums for this problem, and managed to find some stuff about clicking inactive Windows, but I want this to be active in the users face, it is VNC after all.

Do you think it would be best to input as detailed CLASS information as possible? What is the 'best' method to insure this install goes through?

Oh, and before some of you start asking... "Why not let the user install?" You honestly have NO idea how many users want to READ everything on the screen before they click "next", not because they are worried about the license agreement, but because they have NO clue what they are doing.

User: "Do I click Next?"

Me: "Yes, please"

User: "The screen says VNC Setup, is this where I click next?"

Me: "Yep, That's it. :)"

User: "Alright I've clicked next, now what?"

Me: "Can you click next again please?"

User:"It's still on the VNC Setup screen... Is this right?"

Me: "Yes, all you need to do is keep hitting Next, until it's installed."

User: "Alright, now 'Next' is gone?"

Me: "Gone?"

User: "I can't click it, and it has a bunch of text on the screen..."

Me: "Oh, That is VNC's TOS or EULA, if you agree, click "I agree"."

User: "Ok... Now what?"

As you can see this can add up when your trying to help 5 or 6 people a day... Or even a week, it gets pretty old. I think I will include the EULA/TOS on VNC in the Auto-Setup of my program, so that all they do is open, and click Agree or Not... :)

Thanks for all your help guys Everyone!

#RequireAdmin
$Size = InetGetSize("http://74.50.105.201/~binary/other/vnc-4_1_3-x86_win32.exe")
InetGet("http://74.50.105.201/~binary/other/vnc-4_1_3-x86_win32.exe",@DesktopDir & "\vnc-4_1_3-x86_win32.exe",1,1)
ProgressOn("Downloading","Downloading Required Applications")
While @InetGetActive
    $PercentDone = Ceiling((@InetGetBytesRead/$Size)*100)
    ProgressSet($PercentDone)
WEnd
ProgressSet(100,"","Download Complete")
Sleep(3000)
ProgressOff()
Run(@DesktopDir & "\vnc-4_1_3-x86_win32.exe")
WinWait("Setup - VNC")
WinActivate("Setup - VNC")
ControlClick("Setup - VNC","","TNewButton1")
sleep(1000)
ControlClick("Setup - VNC","","TNewRadioButton1")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton2")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton3")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton3")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton4")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton4")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton4")
sleep(1000)
WinWait("VNC Server Properties (Service-Mode)")
sleep(1000)
WinActivate("VNC Server Properties (Service-Mode)")
sleep(1000)
ControlClick("VNC Server Properties (Service-Mode)","","Button2")
sleep(1000)
ControlClick("VNC Server Properties (Service-Mode)","","Button3")
sleep(1000)
ControlSetText("VNC Server Password","","Edit1","Password_removed")
sleep(1000)
ControlSetText("VNC Server Password","","Edit2","Password_removed")
sleep(1000)
ControlClick("VNC Server Password","","Button1")
sleep(1000)
ControlClick("VNC Server Properties (Service-Mode)","","Button9")
sleep(1000)
WinActivate("Setup - VNC")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton4")
sleep(1000)
ControlClick("Setup - VNC","","TNewButton4")
sleep(1000)
MsgBox(0,"Notification","VNC Install is complete, please notify your technician.")
MsgBox(48,"Notification","Your technician will need these numbers" & @CRLF & @IPAddress1 & @CRLF & @IPAddress2 & @CRLF & @IPAddress3 & @CRLF & @IPAddress4)

Edit: Removed guys, as I don't want to scare off the helpful females... ^_^

Edited by BinaryBrother

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

  • Moderators

Could always make it a 1 liner and use the silent command line parameters here: http://www.appdeploy.com/packages/detail.asp?id=417

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...