Sign in to follow this  
Followers 0
troon

ControlClick

14 posts in this topic

Hey, I want to use the ControlClick but it doesnt work: 

ShellExecute(@ScriptDir & "\gs907w64.exe")
WinWait("GPL Ghostscript Setup")
ControlClick("GPL Ghostscript Setup", "&Next >", "Button2")

Autoit Info shows: 

>>>> Window <<<<
Title:  GPL Ghostscript Setup
Class:  #32770
Position:   708, 325
Size:   503, 390
Style:  0x94CA084C
ExStyle:    0x00010100
Handle: 0x000000000029086E

>>>> Control <<<<
Class:  Button
Instance:   2
ClassnameNN:    Button2
Name:   
Advanced (Class):   [CLASS:Button; INSTANCE:2]
ID: 1
Text:   &Next >
Position:   324, 327
Size:   75, 23
ControlClick Coords:    39, 11
Style:  0x50010000
ExStyle:    0x00000004
Handle: 0x00000000002C07F6

What is wrong, pls help me. 

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Dosent work, setup open but nothing more happens

I tried it with .msi setups, there was no problems...

(sorry for bad english) 

Edited by troon

Share this post


Link to post
Share on other sites
ShellExecute(@ScriptDir & '\gs907w64.exe')
WinWait('GPL Ghostscript Setup')
Local $hGhostscript = WinGetHandle('GPL Ghostscript Setup')
Local $hButton_I2 = ControlGetHandle($hGhostscript, '', '[CLASS:Button; INSTANCE:2]')
ControlFocus($hGhostscript, '', $hButton_I2)
Sleep(250)
ControlClick($hGhostscript, '', $hButton_I2)

 


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites

Doesnt work ):

Setup opens and the Button get blue marked like i selected it but i dont klick it. 

Share this post


Link to post
Share on other sites

It works for me.
Try increasing the sleep to 500 or even 1000.


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites

Dont work, my pc os is windows 10 maybe it blocks it or something like this? 

Share this post


Link to post
Share on other sites

I don't have a Win10 Box available at the moment.
Maybe someone else can test it for you.

Here is a direct download link:
http://downloads.ghostscript.com/public/gs907w64.exe


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post


Link to post
Share on other sites

Okay ill try it 

 

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