AutoitMike Posted April 5, 2011 Share Posted April 5, 2011 I am attempting to click the "Print" button on a printer box dialog. AutoitInfo says that the print button has ID 1, yet Controlclick("Print",1) does not work.Using Send("!p") does work, however, I would like to use the Controlclick function. I have WinwaitActive("Print") just before the ControlClick. No go----Since sending the keys works, I can assume that the window has the focus. I am using ControlClick successfully elsewhere in other scripts without jumping through any fancy hoops, fancy code or anything peculiar.Thanks Link to comment Share on other sites More sharing options...
bogQ Posted April 5, 2011 Share Posted April 5, 2011 (edited) Controlclick second parametar is "text" in window so ID must b on third parametar ControlClick ( "title", "text", controlID) ControlClick ( "Print", "", 1) Or try ControlSend and send {space} or {enter} to the control Note that ID on Print window have probably 2 controls with identical ID, using some advance option can help eg. Advanced (Class): [CLASS:Button; INSTANCE:13] ControlClick ( "Print", "", "[CLASS:Button; INSTANCE:13]") or something like that Edited April 5, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
AutoitMike Posted April 5, 2011 Author Share Posted April 5, 2011 Controlclick second parametar is "text" in window so ID must b on third parametar ControlClick ( "title", "text", controlID) ControlClick ( "Print", "", 1) Or try ControlSend and send {space} or {enter} to the control Note that ID on Print window have probably 2 controls with identical ID, using some advance option can help eg. Advanced (Class): [CLASS:Button; INSTANCE:13] ControlClick ( "Print", "", "[CLASS:Button; INSTANCE:13]") or something like that BogQ, The controlSend works Thanks PS, I had the parameters in the code correct for controlClick, I had it wrong only in the post. 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