Sign in to follow this  
Followers 0
nevermind

How to switch tabitem

3 posts in this topic

i am writing a program to automate something.

I am stuck at a place where i need to switch to a different tabitem. But I am unable to find the index and change tabs.

Can one of you tell me how this is done please.

Share this post


Link to post
Share on other sites



#Include <GUITab.au3>

$hWnd = GUICreate('MyGUI', 400, 400)
GUICtrlCreateTab(10, 10, 380, 380)
GUICtrlCreateTabItem('Tab1')
GUICtrlCreateTabItem('Tab2')
GUICtrlCreateTabItem('Tab3')
GUICtrlCreateTabItem('Tab4')
GUICtrlCreateTabItem('Tab5')
GUICtrlCreateTabItem('Tab6')
GUICtrlCreateTabItem('Tab7')
GUISetState()

$hTab = ControlGetHandle($hWnd, '', '[CLASS:SysTabControl32; INSTANCE:1]')

For $i = 1 To 7
    Sleep(500)
    _GUICtrlTab_SetCurSel($hTab, $i)
Next

Do
Until GUIGetMsg() = -3

Share this post


Link to post
Share on other sites

I used this instead. Thanks anyway.

ControlCommand("Add Profile","","SysTabControl321","TabRight", "")

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0