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 

ControlGet Help

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
searle



Joined: 09 Nov 2009
Posts: 8

PostPosted: Fri Dec 11, 2009 11:20 pm    Post subject: ControlGet Help Reply with quote

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
View user's profile Send private message
entropic



Joined: 21 Dec 2008
Posts: 181

PostPosted: Sat Dec 12, 2009 2:19 am    Post subject: Reply with quote

Try this
Code:

ControlGet, List, List,, ListBox1, A
Loop, Parse, List, `n
    MsgBox Item number %A_Index% is %A_LoopField%.
Back to top
View user's profile Send private message
searle



Joined: 09 Nov 2009
Posts: 8

PostPosted: Mon Dec 14, 2009 5:14 pm    Post subject: Reply with quote

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? Smile

Thanks!
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5043
Location: the tunnel(?=light)

PostPosted: Mon Dec 14, 2009 5:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
searle



Joined: 09 Nov 2009
Posts: 8

PostPosted: Mon Dec 14, 2009 7:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
searle



Joined: 09 Nov 2009
Posts: 8

PostPosted: Thu Dec 17, 2009 7:30 pm    Post subject: Reply with quote

thoughts?
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5043
Location: the tunnel(?=light)

PostPosted: Thu Dec 17, 2009 10:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Tyrsius



Joined: 09 Jul 2009
Posts: 140

PostPosted: Thu Dec 17, 2009 11:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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