devi Posted August 2, 2011 Posted August 2, 2011 In the application,the window is split into multiple windows.In one particular window there are multiple tabs are placed at right hand side of the window .Now i want to select the tabs,but these tabs have similar class name and instance for the window but not the tabs.there is no individual property for the tabs.Even the tab name is also not appeared in visible text of frozen window info.Is there a way to solve this other than using co-ordinates?
monoscout999 Posted August 2, 2011 Posted August 2, 2011 Can you get the Tab class? you can send to it a controlfocus and controlsends simulating CTRL + DIRECTION to switch between diferent tabs.
somdcomputerguy Posted August 2, 2011 Posted August 2, 2011 See the ControlCommand() function in the Helpfile. In particular, the CurrentTab, TabLeft, and TabRight parameters. I include some code that I use, hopefully this helps you out a bit, at least to understand the function. This is how the code works: I have a program running that has more than one tab. First I check what is the active tab (with CurrentTab), if it's not tab 1 (which I need to be active), then I cycle thru ControlCommand with the TabLeft parameter till it is. $TabItem = ControlCommand("Program Title", "", "SysTabControl321", "CurrentTab") If $TabItem <> 1 Then For $a = 1 to $TabItem - 1 ControlCommand("Program Title", "", "SysTabControl321", "TabLeft") Sleep(100) Next EndIf I don't know if this will help you at all, I hope it does in someway though. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
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