alawoona Posted May 2, 2004 Posted May 2, 2004 (edited) I have written a gui that uses the Tab control. Is there anyway I can get the script to select a tab. The tabs have different names but are both identified as "Class: SysTabControl321 Text: " using window spy. So I cannot distinguish between them using the "text" paramater. I cannot find a GUI function that will select a tab. Edited May 2, 2004 by alawoona
alawoona Posted May 2, 2004 Author Posted May 2, 2004 (edited) thanks larry. . . can't see in front of my nose Edited May 2, 2004 by alawoona
CyberSlug Posted May 3, 2004 Posted May 3, 2004 You can use GUISendMsg / GUIReceiveMsg with tab controls. I use the following (assume $tab is the tab's GUISetControl reference): GUISendMsg($tab, $TCM_SETCURSEL, $n, 0) ;activates the Nth tab (first index is 0) GUISendMsg($tab, $TCM_DELETEITEM, $n, 0) ;deletes the Nth tab Here's a list of some values. You may need to look at the Windows API to determine the proper parameters for GuiSendMsg.... $TCM_FIRST = 0x1300 $TCM_GETCURFOCUS= ($TCM_FIRST + 47) $TCM_GETCURSEL = ($TCM_FIRST + 11) $TCM_DELETEITEM = ($TCM_FIRST + 8) $TCM_SETCURFOCUS = ($TCM_FIRST + 48) $TCM_SETCURSEL = ($TCM_FIRST + 12) I do not know the difference between 'CURSEL' and 'CURFOCUS' becuase the seem to have the same effect. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Valik Posted May 3, 2004 Posted May 3, 2004 TCM_GETCURSEL - Determines the currently selected tab in a tab control. TCM_GETCURFOCUS - Returns the index of the item that has the focus in a tab control.
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