| View previous topic :: View next topic |
| Author |
Message |
searle
Joined: 09 Nov 2009 Posts: 8
|
Posted: Fri Dec 11, 2009 11:20 pm Post subject: ControlGet Help |
|
|
Hi all,
I've been trying to exact the values of every option in a listbox, but have failed to get more than gibberish returned.
Currently I would be happy with just getting a single value to begin with, but I can't even manage that.
The current code:
| Code: | ControlGet, OutputVar, List, Focused, ListBox1, A
msgbox %OutputVar%
|
I have also tried a number of other combinations, but with little success.
Any thoughts on how to go about accomplishing this? It currently does not even return readable text.
Link to pic of listbox: http://img301.imageshack.us/i/tempc.jpg/
Thanks. |
|
| Back to top |
|
 |
entropic
Joined: 21 Dec 2008 Posts: 181
|
Posted: Sat Dec 12, 2009 2:19 am Post subject: |
|
|
Try this
| Code: |
ControlGet, List, List,, ListBox1, A
Loop, Parse, List, `n
MsgBox Item number %A_Index% is %A_LoopField%.
|
|
|
| Back to top |
|
 |
searle
Joined: 09 Nov 2009 Posts: 8
|
Posted: Mon Dec 14, 2009 5:14 pm Post subject: |
|
|
| entropic wrote: | Try this
| Code: |
ControlGet, List, List,, ListBox1, A
Loop, Parse, List, `n
MsgBox Item number %A_Index% is %A_LoopField%.
|
|
Thanks for the reply, but I am still getting the same results. All it returns is "Item number 1 is ..." and then four random non-alphanumeric characters.
Any other suggestions?
Thanks! |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Mon Dec 14, 2009 5:51 pm Post subject: |
|
|
I get the feeling that the note on the ControlGet page is probably coming into play here:
| ControlGet wrote: | | NOTE: Some applications store their ListView text privately, which prevents their text from being retrieved. |
Granted, this note specifically applies to a ListView but I can't see why it couldn't also apply to a ListBox. _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
searle
Joined: 09 Nov 2009 Posts: 8
|
Posted: Mon Dec 14, 2009 7:15 pm Post subject: |
|
|
| sinkfaze wrote: | I get the feeling that the note on the ControlGet page is probably coming into play here:
| ControlGet wrote: | | NOTE: Some applications store their ListView text privately, which prevents their text from being retrieved. |
Granted, this note specifically applies to a ListView but I can't see why it couldn't also apply to a ListBox. |
hmm... and how would I go about confirming that this is my issue? |
|
| Back to top |
|
 |
searle
Joined: 09 Nov 2009 Posts: 8
|
Posted: Thu Dec 17, 2009 7:30 pm Post subject: |
|
|
| thoughts? |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Thu Dec 17, 2009 10:13 pm Post subject: |
|
|
The fact that plain text is being returned as garbled junk would infer that this is the case, but you can only really confirm it for certain by having access to the source code and knowing what to look for, or by contacting the creator(s) of the software to find out if this is the case. _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Thu Dec 17, 2009 11:00 pm Post subject: |
|
|
You could confirm this is an issue by using the same code on a listbox you know is NOT private, such as one in a GUI that you made.
Just a thought. |
|
| Back to top |
|
 |
|