| View previous topic :: View next topic |
| Author |
Message |
Thalon
Joined: 12 Jul 2005 Posts: 640
|
Posted: Mon Apr 02, 2007 1:20 pm Post subject: Choose-String --> Exact Match |
|
|
Hi Chris!
It would be very nice to have ChooseString with the option of an exact match!
| 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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Thu Apr 05, 2007 1:50 am Post subject: |
|
|
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 |
|
 |
Guest
|
Posted: Tue Mar 04, 2008 5:44 pm Post subject: |
|
|
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
|
Posted: Sat Mar 08, 2008 2:49 pm Post subject: |
|
|
| 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?
 |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Mar 10, 2008 10:46 pm Post subject: |
|
|
A simple workaround.. perfect!
Thank you much,
-paul |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 323
|
Posted: Thu May 08, 2008 11:57 pm Post subject: |
|
|
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 |
|
 |
|