Jump to content

Recommended Posts

Posted (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 by alawoona
Posted

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!
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...