Jump to content

Recommended Posts

Posted

Hi I am new to AutoIT. I am making a script where I can automate clicking of button on dialog.

 

I have tried to use controlclick but no luck. Can someone help please? 

Thanks

  • Moderators
Posted

Moved to the appropriate forum, as the DEV forum very clearly states:

Quote

Do not create AutoIt-related topics here, use AutoIt General Help and Support

As to your question, "no luck" doesn't tell us anything. How about helping us help you by posting your code ;)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

Run ("setup_REL_SMS_6_3_0.exe")
Sleep(5000)
ControlClick("Screen Management System: Installation Options", "", "[CLASS:BUTTON; TEXT:&Next >; INSTANCE:2]")

 

Posted

>>>> Window <<<<
Title:    Screen Management System: Installation Options
Class:    #32770
Position:    231, 203
Size:    426, 292
Style:    0x94CA084C
ExStyle:    0x00010100
Handle:    0x00041490

>>>> Control <<<<
Class:    Button
Instance:    2
ClassnameNN:    Button2
Name:    
Advanced (Class):    [CLASS:Button; INSTANCE:2]
ID:    1
Text:    &Next >
Position:    335, 231
Size:    75, 23
ControlClick Coords:    42, 18
Style:    0x50010001
ExStyle:    0x00000004
Handle:    0x0057131A

>>>> Mouse <<<<
Position:    611, 478
Cursor ID:    2
Color:    0xF0F0F0

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
&Next >
Cancel
Nullsoft Install System v3.0a2
Select components to install:
Space required: 325.8MB
Check the components you want to install and uncheck the components you don't want to install. Click Next to continue.


>>>> Hidden Text <<<<
Custom
 

Posted (edited)

try that

Local $hSetup = Run ("setup_REL_SMS_6_3_0.exe")

ControlClick ($hSetup, 'Screen Management System: Installation Options', '[CLASS:Button; INSTANCE:2]')

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted

Tried ControlClick ('[CLASS:#32770]', 'Screen Management System: Installation Options', '[CLASS:Button; INSTANCE:2]')

Application launches as before but "next" button is not pressed.

Posted

Local $hSetup = Run ("setup_REL_SMS_6_3_0.exe")
WinWait($hSetup, 'Screen Management System: Installation Options')
ControlClick ($hSetup, 'Screen Management System: Installation Options', '[CLASS:Button; INSTANCE:2]')

 

Tried above but same issue :(

Posted (edited)

Remove the text property or the instance property. I think you are now stating give me the 2nd button with caption text whereas there is only 1

Add also a consolewrite after run to make sure you reach the sleep command and your script is not blocked due to waiting for run getting finished.

Edited by junkew
Posted

ControlClick("Screen Management System: Installation Options", "", "[CLASS:BUTTON;; INSTANCE:2]")

or

ControlClick("Screen Management System: Installation Options", "", "[CLASS:BUTTON; TEXT:&Next >

ControlClick("Screen Management System: Installation Options", "", "[CLASS:BUTTON; TEXT:&Next >]")
ControlClick("Screen Management System: Installation Options", "", "[CLASS:BUTTON;; INSTANCE:2]")

]")

  • Moderators
Posted
2 hours ago, GSingh said:

Help please..

@GSingh first off, please wait 24 hours before bumping your post. This may be the most important thing in the world to you, but you need to show some patience.

Secondly, IF you are going to bump your post, the expectation would be that you have gone back and tried the suggestions given, and are reporting either success or failure of those suggestions. junkew suggested you do some reading on FAQ31, did you? Did you try anything after doing so? You have provided zero information outside of a screenshot to show that you are putting forth any effort. This forum is dedicated to helping with scripts, not spoon-feeding it to you.

Lastly, as this application was compiled with NullSoft, have you looked for command line parameters that will allow you to install silently with options? Perhaps if we knew the application, we could provide more assistance.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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
  • Recently Browsing   0 members

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