Jump to content
Sign in to follow this  
kra55

How to get Tab names?

Recommended Posts

kra55

Hey all have been playing around with Tabs now ^_^

So far i can tabright and left and also retrive the current tab as a number/instance.....I have looked around and cannot see how retrive the name of the selected tab rather then the number. If this is possible please advise...Thanking you in advance ;)

Below is what i am using atm but as the tabs change i really need this to be based on name....

$test = ControlCommand("Chicken", "", "[CLASS:SysTabControl32; INSTANCE:2]", "CurrentTab", "")
Edited by kra55

Share this post


Link to post
Share on other sites
exodius

Just to clarify, you want the text on the tab?

And also, I take it this is in a secondhand-window (as in not an autoit gui that you're making?)?

Share this post


Link to post
Share on other sites
kra55

Sorry that is correct the text/heading off the tab itself

And once again you are correct this is a separate window/ not a user created Autoit gui

Im not sure if this makes a difference but when I use the info tool it does show the headings under the visible text..

Thank you ^_^

Share this post


Link to post
Share on other sites
kra55

As no replies guessing this may not be possible - Im guessing the alternative will be for valadate what tab i am on by what is displayed in the tab......Assuming they are all differant which they are.....

Share this post


Link to post
Share on other sites
kra55

Ok so what i have done below basically searchs the tabs for a particular label once this is found it stops.....

Im guessing i could prob make this more efficiant but im happy to just have somthing ^_^

Now i am dealing with SysListControl....omfg what a pain.....

;go to first tab
While ControlCommand("chicken", "", "[CLASS:SysTabControl32; INSTANCE:2]", "CurrentTab", "") <> 1
    ControlCommand("chicken", "", "[CLASS:SysTabControl32; INSTANCE:2]", "TabLeft", "")
Sleep(50)
WEnd
; Search Tabs forcontacts to show we are on the contacts tab
While ControlGetText("chicken", "", "Static19") <> "contacts:"
    ControlCommand("chicken", "", "[CLASS:SysTabControl32; INSTANCE:2]", "TabRight", "")
    Sleep(50)
WEnd

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.