Jump to content
Sign in to follow this  
troon

ControlClick

Recommended Posts

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

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

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

Just realized, It's because the installation app requires admin.

You cannot interact with an admin window from a non-admin program, so...

#RequireAdmin

...in script solves problem,

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  

×
×
  • Create New...