Sign in to follow this  
Followers 0
SpiritualMadMan

Tab Controls arrrrggghhh!

4 posts in this topic

First I have searched the forum and I am more confused than ever.

I am a VB6 programmer.

I am *NOT* a 'C' Language Programmer.

I am *NOT* thoroughly familiar with navigating through the windows GUI.

I've taken a look at: _GUICtrlTab_GetItemText

Of particular concern is rewriting this so *I* can understand it...

MsgBox(4160, "Information", "Tab 1 text: " & _GUICtrlTab_GetItemText($hTab, 0))

(The more spread out and verbose the better. Step by Step Line by Line.)

-to-

Something like

GetControlHandle("Window", "", {advanced control ID form})

$Str = _GUICtrlTab_GetItemText($hTab, ?))

MsgBox(0, "Information", $Str)

I take it that _GUICtrlTab_GetItemText() requires the actual TAB Index?

Which means that I'd need to add another line to "discover" which is the Currently Selected Tab?

I have tried $Str = ControlCommand("Window", "", {advanced control ID form}, "CurrentTab", "")

But it always returns the same number no matter which TAB is selected.

I would then like to iterate through the tabs and list all the TAB Names...

I have attached a graphic of the control I am working with.

Let me know what else I can submit to obtain the hand holding I so desperately need.

post-62954-0-90979800-1297805951_thumb.j

Share this post


Link to post
Share on other sites



So you missed _GUICtrlTab_GetCurSel() in the help file? And _GUICtrlTab_GetItemCount()?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

No, I saw them in the UDF's.

But, I am having trouble following what is happening.

MsgBox(4160, "Information", "Tab 1 text: " & _GUICtrlTab_GetItemText($hTab, 0))

(The more spread out and verbose the better. Step by Step Line by Line.)

I hope to try _GUICtrlTab_GetItemCount()? in the morning and see if I get the correct count.

Share this post


Link to post
Share on other sites

I have downloaded the AutoIt 1-2-3 .zip file and will be going through that...

In the mean time I have attached a scriplet to show where I am missing the task at.

I have a Tab Test Form written in VB-6 up on the desktop. it has three rows of Tabs totalling seven...

When I run the script it returns zero...

This is a problem, for me, with the help files.

They show how to create tabs and test what's just been created.

But, do not show how to script already existing Windows.

Thanks for all your help!

Tabs.au3

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