Jump to content

Recommended Posts

Posted

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.

Posted

#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

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...