Jump to content

Not able to click on button in a setup


Go to solution Solved by JohnOne,

Recommended Posts

Hi i am trying to click on the next button in a setup that i need to use, only problem is it is not responding. Below the code and the info:

$TITLE = "Setup - Lenovo Slim USB Keyboard Driver for Windows 7/XP/Vista"
        $SUB = "Welcome to the Lenovo Slim USB Keyboard Driver for Windows 7/XP/Vista Setup Wizard"
            WinWait($TITLE, $SUB)
            If Not WinActive($TITLE, $SUB) Then WinActivate($TITLE, $SUB)
            WinActive($TITLE, $SUB)
            Sleep(100)
            ControlClick($TITLE, $SUB, "[ID:264262]")
            Sleep(100)
            ControlClick($TITLE, $SUB, "button1")
            Sleep(100)
            ControlClick($TITLE, $SUB, "TNewButton:1")
            Sleep(100)
            ControlClick($TITLE, $SUB, "TNewButton1")
            Sleep(100)
            ControlClick($TITLE, $SUB, "[CLASS:TNewButton; INSTANCE:1]")
            Sleep(100)
            ControlClick($TITLE, $SUB, "[CLASSNN:TNewButton1]")
            Sleep(100)
            Send("{enter}")
            Sleep(100)
            ControlSend($TITLE, $SUB, "", "{enter}")

I tried every way i could think of to click on the next button.

Probably a couple of stupid attemds but you cant blame me for trying.

>>>> Window <<<<
Title:  Setup - Lenovo Slim USB Keyboard Driver for Windows 7/XP/Vista
Class:  TWizardForm
Position:   2219, 415
Size:   503, 389
Style:  0x16CA0000
ExStyle:    0x00010100
Handle: 0x00000000001F066E

>>>> Control <<<<
Class:  TNewButton
Instance:   1
ClassnameNN:    TNewButton1
Name:   
Advanced (Class):   [CLASS:TNewButton; INSTANCE:1]
ID: 461326
Text:   &Next >
Position:   327, 327
Size:   75, 23
ControlClick Coords:    29, 14
Style:  0x54010001
ExStyle:    0x00000000
Handle: 0x0000000000070A0E

>>>> Mouse <<<<
Position:   2578, 782
Cursor ID:  0
Color:  0xE8E8E8

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Welcome to the Lenovo Slim USB Keyboard Driver for Windows 7/XP/Vista Setup Wizard

This will install Lenovo Slim USB Keyboard Driver for Windows 7/XP/Vista version 1.10.0.0 on your computer.

It is recommended that you close all other applications before continuing.

Click Next to continue, or Cancel to exit Setup.
&Next >
Cancel

Hope you guys can point me in the right direction...

*EDIT*: After posting i see that the ID of the button changed, that is strainge and don't blame my wrong number in the script please :P

Edited by Wingens
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...