Jump to content
Sign in to follow this  
Wingens

Not able to click on button in a setup

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

Share this post


Link to post
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
Sign in to follow this  

  • Similar Content

    • By basictheprogram
      #include <Constants.au3> Func Install()    ConsoleWrite("Install EasyLog" & @LF)    Local $handle = WinWaitActive("EasyLog USB Device Driver Installer")    ConsoleWrite("Install EasyLog2 " & $handle & @LF)    Local $blah = ControlClick($handle, "", "[CLASS:Button; INSTANCE:1]", "Left", 1)    ConsoleWrite("Install EasyLog3 " & $blah & @LF)    WinClose($handle) EndFunc Install() ConsoleWrite("End of Install!" & @LF) Trying to get AutoIt to click "Install" on the EasyLogUSB Device Driver Installer window.
      Console displays:
      Install EasyLog
      Install EasyLog2 0x001B041E
      Install EasyLog3 1
      End of Install!
      Windows Info confirms the Handle is 0x001B041E

      Window Info for the Control

      For the life of me I cannot figure out why the script is not working. 
      Even $blah says the ControlClick succeeded.
      I've tried Send("{ENTER}") and MouseClick() those didn't work either.
      Any help would be appreciated.
      Thanks.
    • By GillesMaisonneuve
      Good morning,
       
      I am trying to align a two-line text in a button so that it would be centered in the button but can't succeed to do it for the vertical part.
      Can someone tell me what I do wrong ?
      Here is my code:
      $btn3 = GUICtrlCreateButton("Execute " & @LF & " file 1", 100, 65, 60, 50, _ BitOr($BS_CENTER,$BS_BOTTOM,$BS_MULTILINE)) and here is the resulting layout I get in my window.
      I tried to follow the help, made a lot of different parameter combinations (here it's `$BS_BOTTOM`, but I tried `$BS_VCENTER` and `$BS_TOP`), still get the same result : vertical alignement is a no go for me.
      Can someone help ?
      TIA
      Gilles

    • By Pike
      Hey Everyone, I haven't been here in a while and recently picked up my old project. Still an FNG!
      To the point: I want to be able to push the button and either play an mp3, open a file, or open an exe program (all with the same button). The problem is that I don't know how to code for that at "case 1"
              Case 1                                                                                                                                             
                  Local $sRead = IniRead("config.ini", "Config", "One", "Default")                                
                  SoundPlay($sRead, @HotKeyPressed)                                                                     <-------------------------------
                  Run($sRead, @HotKeyPressed)                                                                                 <------------------------------- This 'Run' doesn't work even by itself!
      See code below for layout. If you need more information I will attach more code or answer any questions. Any help is greatly appreciated.
       
      Much Respect,
      Pike
       
      Func _HandleButton() $iClickCount += 1 $iTimer = TimerInit() AdlibRegister("CheckButtonPress", $CheckTime) EndFunc Func CheckButtonPress() If TimerDiff($iTimer) < $CheckTime Or $iTimer = 0 Then Return Switch $iClickCount Case 1 Local $sRead = IniRead("config.ini", "Config", "One", "Default") SoundPlay($sRead, @HotKeyPressed) Run($sRead, @HotKeyPressed) Case 2 MsgBox(0, "INFORMATION:", "Choose the file you want designated to this button") Local $sFileOpenDialog = FileOpenDialog(0, @ScriptDir & "\", "All (*.*)", $FD_FILEMUSTEXIST + $FD_MULTISELECT) If @error Then MsgBox($MB_SYSTEMMODAL, "", "No file(s) were selected.") EndIf Local $sFileName = InputBox("INFORMATION:", "Please Name Your File?" & @CRLF _ & @CRLF _ & "6 Characters or Less", "") IniWrite(@ScriptDir & "\config.ini", "Config", "One", $sFileOpenDialog) IniWrite(@ScriptDir & "\config.ini", "Config", "NameOne", $sFileName) EndSwitch $iClickCount = 0 AdlibUnRegister() EndFunc  

    • By misioooo
      Hi!
       
      I am writing some GUI and i need to use images as buttons, but with text on them (text is from INI file).
      Part with button looks like this:
      $ankieta1 = GUICtrlCreateButton($txtAnk1, 100,350,765,164) GUICtrlSetFont(-1, 22, 800, -1, "Arial") ;GUICtrlSetColor(-1,0xffffff) $hImageBtn_1 = _GUIImageList_Create(765, 164) _GUIImageList_AddBitmap($hImageBtn_1, "c:\path\to\ankieta_clean.bmp") _GUICtrlButton_SetImageList($ankieta1, $hImageBtn_1, 4) GUICtrlSetOnEvent(-1, "On_Ankieta1") The problem - if i uncomment GUICtrlSetColor, color of text changes, but button is just plain gray (no image). How i can change text color not touching image on a button here?
    • By XinYoung
      Quick question: How can I click this "Select All" button in IE? There's no ID, and the href is "#"  
      Am I looking at the wrong html code?
      Am I looking
      Thank you all in advance!
×
×
  • Create New...