troon Posted December 2, 2015 Share Posted December 2, 2015 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: 0x00000000002C07F6What is wrong, pls help me. Link to comment Share on other sites More sharing options...
JohnOne Posted December 2, 2015 Share Posted December 2, 2015 (edited) TryControlClick("GPL Ghostscript Setup", "", "[CLASS:Button; INSTANCE:2]") Edited December 2, 2015 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
troon Posted December 2, 2015 Author Share Posted December 2, 2015 (edited) Dosent work, setup open but nothing more happensI tried it with .msi setups, there was no problems...(sorry for bad english) Edited December 2, 2015 by troon Link to comment Share on other sites More sharing options...
Bert Posted December 2, 2015 Share Posted December 2, 2015 can you command line switches? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
troon Posted December 3, 2015 Author Share Posted December 3, 2015 No Link to comment Share on other sites More sharing options...
ripdad Posted December 3, 2015 Share Posted December 3, 2015 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 Link to comment Share on other sites More sharing options...
troon Posted December 3, 2015 Author Share Posted December 3, 2015 Doesnt work ):Setup opens and the Button get blue marked like i selected it but i dont klick it. Link to comment Share on other sites More sharing options...
ripdad Posted December 3, 2015 Share Posted December 3, 2015 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 Link to comment Share on other sites More sharing options...
troon Posted December 3, 2015 Author Share Posted December 3, 2015 Dont work, my pc os is windows 10 maybe it blocks it or something like this? Link to comment Share on other sites More sharing options...
ripdad Posted December 3, 2015 Share Posted December 3, 2015 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 Link to comment Share on other sites More sharing options...
JohnOne Posted December 4, 2015 Share Posted December 4, 2015 Cannot get any window or control interaction to work on windows 10 on this particular application.UIAutomation might be on the cards.Example scripts. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted December 4, 2015 Share Posted December 4, 2015 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, troon 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
troon Posted December 4, 2015 Author Share Posted December 4, 2015 Okay ill try it Link to comment Share on other sites More sharing options...
troon Posted December 4, 2015 Author Share Posted December 4, 2015 Well my code works now! #RequireAdmin ShellExecute(@ScriptDir & "\gs907w64.exe") WinWait("GPL Ghostscript Setup") ControlClick("GPL Ghostscript Setup", "&Next >", "Button2")Thanks guys! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now