captainNcola Posted January 27, 2014 Share Posted January 27, 2014 I am using AutoIt to automate some functionality in an external GUI application. I am trying to future-proof the script by using control names and text rather than hard coding indexes for the controls. I have run into some inconsistent behavior regarding the Tab controls and the _GUICtrlTab_xxxx functions. Let's assume that I have correctly pulled the handle for the Tab Control. I am able to use the following functions successfully: _GUICtrlTab_ClickTab($hTab, 1) ; Switches to the tab at index 1. _GUICtrlTab_GetItemCount($hTab) ; Successfully returns the number of tabs in the control. I am unable to use the following functions though: _GUICtrlTab_FindTab($hTab, "Tab Text") ; Returns -1 _GUICtrlTab_GetItem($hTab, 1) ; Returns array {1, "", 0, ""} - So it is able to determine that the tab with the index of 1 is currently selected however the text is not returned. Does anybody have any ideas? Do these functions only partially support external winforms gui? Link to comment Share on other sites More sharing options...
jdelaney Posted January 27, 2014 Share Posted January 27, 2014 (edited) Are you passing in the actual handle to the conrol, or some other identifier. Try passing in the return from controlgethandle, and attempt this one as well: _GUICtrlTab_GetItemText Doing the above, I can get the data I need from my companies application, but not guaranteed for all. Edited January 27, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
captainNcola Posted January 27, 2014 Author Share Posted January 27, 2014 (edited) I am passing the actual handle returned by ControlGetHandle. Trying _GUICtrlTab_GetItemText($hTab, 1) returns null. Does this mean that these functions will have limited support for this particular application? Are there any options that I could set that would modify this behavior? Thanks! Edited January 27, 2014 by captainNcola 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