AutoHotkey Community

It is currently May 27th, 2012, 12:30 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: ControlGet Help
PostPosted: December 12th, 2009, 12:20 am 
Offline

Joined: November 9th, 2009, 6:19 pm
Posts: 8
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2009, 3:19 am 
Offline

Joined: December 21st, 2008, 7:29 pm
Posts: 181
Try this
Code:
ControlGet, List, List,, ListBox1, A
Loop, Parse, List, `n
    MsgBox Item number %A_Index% is %A_LoopField%.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2009, 6:14 pm 
Offline

Joined: November 9th, 2009, 6:19 pm
Posts: 8
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2009, 6:51 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2009, 8:15 pm 
Offline

Joined: November 9th, 2009, 6:19 pm
Posts: 8
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 8:30 pm 
Offline

Joined: November 9th, 2009, 6:19 pm
Posts: 8
thoughts?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 11:13 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2009, 12:00 am 
Offline

Joined: July 9th, 2009, 1:13 am
Posts: 140
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.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google [Bot], iDrug, Leef_me, Ohnitiel, rjgatito and 19 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