Sign in to follow this  
Followers 0
Wingens

Not able to click on button in a setup

3 posts in this topic

#1 ·  Posted (edited)

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



stupid me, did not try that!

Thank you so much

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  
Followers 0

  • Similar Content

    • thoms
      By thoms
      Hello Forum,
      As said in the title, I'm searching a way to disable all tabstops in a GUI. My GUI includes 15 buttons and 3 edit controls.
      My questions:
      - is there a way to disable all tabstops at a time
      - is there a way to list all controls of a GUI and then disable tabstops one by one
      - or should I use the following line after each button creation:
      _WinAPI_SetWindowLong(GUICtrlGetHandle(-1), $GWL_STYLE, BitAND(_WinAPI_GetWindowLong(GUICtrlGetHandle(-1), $GWL_STYLE), BitNOT($WS_TABSTOP))) Thanks in advance for your valuable help!
      Thoms
      Edit: or maybe disable TAB key? I don't remember how to do!
    • lattey
      By lattey
      I used the window info tool to get what I've got below, but it just doesn't click the button. I run the script, nothing happens. 
      WinActivate("SELECTION") Sleep(200) ControlClick("SELECTION", "", "[CLASS:Button;INSTANCE:2]") i think maybe the autoit cannot detect the windows. So what i do:
       
      MouseClick( "", 503, 500) local $blanktitle = WinGetTitle("[ACTIVE]") If StringInStr($blanktitle, "SELECTION") Then msgbox("","", "got") WinActivate($blanktitle) ControlClick($blanktitle, "", "[CLASS:Button;INSTANCE:2]") Endif The script can detect the windows as the it is prompt "got" message. But it just doesn't click the button.
      Please help.
      Thanks for any help you can offer.
    • AppSoftwareVld
      By AppSoftwareVld
      Hello,
       
      I need this for a project and I don't find a method for the next problem.
      I want when I click a button to create a variable ("$variable1") so if I press one more time to create one more ("$variable2") and create more and more how many times you press the button.
       
      Do you have an idea ? 
      Thank you for your attention !
    • rte7
      By rte7
      Hello. We work with the BMC Remedy site to manage incidents and would like to automate the processes of clicking through this button code:
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> I use firefox with mozrepl and autoit with include FF.au3
      I need your help
      I read the topic https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/ but I could not run the code from the listed commands
      ...
      It is necessary to press the button and from the list of the menu of cahorsations to select the item = "zone of trust abonent"
      Screen # 1 http://joxi.ru/52aJK7bh4a7ypA or below.
      1) Press button
      <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a>
      2) After pressing the button, I need to choose in this menu of 4 items to select an item called "zone of trust abonent", Screen # 2 - http://joxi.ru/p27gwQKHo71VQ2
      html code table items
      <table class="MenuTable" cellpadding="0" cellspacing="0" style="width: 179px;"> <tbody class="MenuTableBody"> <tr class="MenuTableRow"> <td class="MenuEntryName" nowrap="">zone of trust abonent</td> <td class="MenuEntryNoSub" arvalue="zone of trust abonent"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust operator"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust third operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust third operator"></td></tr> <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">No settings</td> <td class="MenuEntryNoSubHover" arvalue="No settings"></td> </tr> </tbody> </table>
       
       
      More in detail, I choose from the menu item "zone of trust abonent" Screen # 3 - http://joxi.ru/GrqVq4ZIQEPW4m

       
      3) The choice is made, Screen # 4 http://joxi.ru/v297w6aC3PovLr
      <textarea class="text sr " wrap="off" id="arid_WIN_0_1000002488" cols="20" maxlen="60" style="top:21; left:0; width:179; height:21;" armenu="CFG:PRC:CategoryHPD-Res-T1-Q" mstyle="2" arautoc="1" arautocmb="1" arautocak="0" arautoctt="400" rows="1"> </textarea>
       
      It's all. I would be very grateful to you =) !!!!!!!!!!
      Here are more detailed codes in the attachment. 
      button1.txt
      menu - table.txt
      all.txt
    • Nareshm
      By Nareshm
      I create message box but i dont know how to add button action when i click it.

      Help for : Add script for Button : Left, Right, Right Finger
      example when i press Left finger button do Case $idNotepad
                      $iPID = WinActivate ( " :PS :: Version - 2.8.0.0  - [eFS Bill]")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:btnReset]", "{esc}")
                              ControlClick ( " :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]")
                              ControlSend(" :DS  - eF:: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "^v")
                              ControlSend(" :DS  - eF :: Version - 2.8.0.0  - [eF Bill]", "", "[NAME:txtrdNo]", "{enter}")
      How to add like above ?
                    
                                                                sorry for my bad english