KonnectTest Posted February 9, 2010 Share Posted February 9, 2010 (edited) Hi, Is it possible to send a mouse click command to a button that has focus? I am setting focus to the button by tabbing to it. I cannot rely on mouse coordinates as I wish to run the script on different computers with different resolutions etc. Unfortunately I am unable to "click" the button using space, enter or any other keys for that matter. :-( Also, I cannot set focus to the button using using controlFocus (and hence controlClick) as the button resides in an ActiveX component and therefore cannot be identified. Thanks Edited February 9, 2010 by KonnectTest Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 9, 2010 Share Posted February 9, 2010 Try ControlClick() either with "" for the ControlID, or just use the ID of the ActiveX control. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
KonnectTest Posted February 9, 2010 Author Share Posted February 9, 2010 Try ControlClick() either with "" for the ControlID, or just use the ID of the ActiveX control.Thanks for your reply. Unfortunately no variations of your suggestion worked. :-( The best result I achieved was a "click" which seemed like it was right in the middle of the page. Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 9, 2010 Share Posted February 9, 2010 Post what you get on the Summary tab of the AutoIt Window Info Tool (AU3Info.exe) when you look at that control. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
KonnectTest Posted February 10, 2010 Author Share Posted February 10, 2010 Post what you get on the Summary tab of the AutoIt Window Info Tool (AU3Info.exe) when you look at that control. Screenshot attached. Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 10, 2010 Share Posted February 10, 2010 Ah, snap! That makes it easy. What you have is an embedded instance of IE. Look in the help file at the _IE* functions of Dale's IE.au3 UDF. Get an object reference to the embedded browser with _IEAttach() and handle it like you would any other IE web page automation. $oIE = _IEAttach("New Request Form", "Embedded") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
KonnectTest Posted February 10, 2010 Author Share Posted February 10, 2010 Alright, I'll give this a go. I think it might require a bit of up-skilling on my part. :-) 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