AutoHotkey Community

It is currently May 26th, 2012, 8:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: July 25th, 2005, 11:54 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi,

actually AHK selects the first matching Tab, so if I use this:

Code:
Gui, Add, Tab,, NameSecond|Name

Gui, Tab, Name
Gui, Add, Text,, Test1
Gui, Tab, NameSecond
Gui, Add, Text,, Test2


all Texts go to Tab "NameSecond".

What about on option to exactly match the names?

Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 4:26 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks; I've made a note of this idea. In the meantime, you probably know that you can refer to a tab by its number rather than its name. There is no ambiguity then.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2005, 4:57 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi Chris,

as I create the Tabs dynamically they won't have always the same number. Is there a way to get the Number of a tab by its name?

Till now I tried to avoid those names, but it would be nice to get such an option.

Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2005, 9:34 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Tekl wrote:
...as I create the Tabs dynamically they won't have always the same number.
For now, I think the best solution is to have the script track how many tabs are in the control so that it knows the tab number when it adds a tab. If the script is heavily dynamic, it might also have to track the position of each tab in the list (perhaps via an array).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2005, 8:48 am 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Thanks,

I'll try it with an Array. But if you can say, it could be implemented in some days, I would like to wait. ;-)

Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2005, 2:28 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I don't think it will be soon because it doesn't score high in priority. Priority is based primarily on expected usage/benefit + difficulty.

In this case, a new syntax would have to be devised and documented. Suggestions are welcome.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2005, 2:54 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Hi Chris,

ok ...

here are some suggestions:

1. SetTabMatchMode, 1|2|3 (like SetTitleMatchMode)
2. Gui, Tab, {Name}, 1|2|3 (same parameters)
3. Gui, Tab, {Name}, ExactMatch

Tekl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2005, 9:02 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Those are good ideas. I've added this feature using your suggestion. Here is an example:

Gui, Tab, My Tab,, Exact ; Set it to be the tab whose name exactly matches "My Tab" (case sensitive also).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 30th, 2005, 9:09 pm 
Offline

Joined: September 24th, 2004, 3:00 pm
Posts: 814
Location: Germany
Aarrgh ... :shock:

Now I have rewritten my script using Arrays. As this had low priority how fast do you implement high-priority things? ;-)

So I remove the Arrays again to save some space ...

Thank your very much.

Tekl


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group