AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Choose-String --> Exact Match

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Mon Apr 02, 2007 1:20 pm    Post subject: Choose-String --> Exact Match Reply with quote

Hi Chris!

It would be very nice to have ChooseString with the option of an exact match! Smile

Quote:
GuiControl, ChooseString, ControlID, String: Sets the selection (choice) in a ListBox, DropDownList, ComboBox, or Tab control to be the entry whose leading part matches String. The search is not case sensitive. For example, if a the control contains the item "UNIX Text", specifying the word unix (lowercase) would be enough to select it. The pipe and double-pipe prefix are also supported (see "Choose" above for details).


Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Thu Apr 05, 2007 1:50 am    Post subject: Reply with quote

I will add it to the to-do list. It probably won't get done anytime soon; so I hope you can find a workaround.

Thanks.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Tue Mar 04, 2008 5:44 pm    Post subject: Reply with quote

Has anyone figured out a workaround for the "exact match"?

I have the following:

Code:
Gui, Add, DropDownList, vOptions, A B C|A B|A
GuiControl, ChooseString, Options, A


Unforutnately, the result of the Choosestring is to always select "A B C" since it matches part of the string.

I suppose I could use the "Sort" option on the DropDownList, but I'd rather not do that since the original order is important to my task.

Any help is appreciated,
-paul
Back to top
haichen



Joined: 05 Feb 2007
Posts: 97
Location: Osnabrück, Germany

PostPosted: Sat Mar 08, 2008 2:49 pm    Post subject: Reply with quote

Code:
s=A B
if s=A B C
  n:=1
else if s=A B
  n:=2
else if s=A
  n:=3

GuiControl, Choose,Options,%n%


Does this help?
Very Happy
Back to top
View user's profile Send private message
Guest






PostPosted: Mon Mar 10, 2008 10:46 pm    Post subject: Reply with quote

A simple workaround.. perfect!

Thank you much,
-paul
Back to top
Icarus



Joined: 24 Nov 2005
Posts: 323

PostPosted: Thu May 08, 2008 11:57 pm    Post subject: Reply with quote

Im +1 on this feature request.

Bumped into the same problem where I had to select by string.
My solution was similar, only more generic (loop through all the items, and if DdlItem = MyItem then NR = A_Index)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group