Sign in to follow this  
Followers 0
Flipper

Cannot get text from a listbox

7 posts in this topic

#1 ·  Posted (edited)

Hi Guys..

I'm trying to extract text from what appears to be a list box. All attempts have so far failed.

- refer to the image.

The developers have just inheried this and cannot tell me much about it.

Any help gratefully accepted!

Flip

ControlId 401 ;-)

Edited by Flipper

Share this post


Link to post
Share on other sites



Hi,

have you tried ControlGetText , or can you export the data and then parse it?

good luck!

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

extract from script....

$TEMP = ControlGetText("","",401)

MsgBox(0,"deleteme",$TEMP)

produces an empty message box.

Note, in the image, the autoIT window info shows the text as <null>

How would I extract the text? I've done this on a differect application by using

the clipboard, but that method fails here as I can't even select all the text.

Cheers!

<Sorry! I used the Id "Flipper" as I had forgotten my correct ID. Written down on a post-it note now!>

Edited by System Tester

The AutoIt help file should be interrogated.The Editor should be SciTe.The forums should have been searched.

Share this post


Link to post
Share on other sites

Welcome to the forums!

Based on your screenshot, it is in fact a ListBox.

Take a look at ControlCommand...GetCurrentSelection and _GUICtrlListGetSelItemsText (Beta).


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

Thanks.

$temp1 = ControlCommand("","",401,"getcurrentselection","")

MsgBox(0,"deleteme",$TEMP1)

returns "1"

Still looking at how _GUICtrlListGetSelItemsText works


The AutoIt help file should be interrogated.The Editor should be SciTe.The forums should have been searched.

Share this post


Link to post
Share on other sites

From the documentation....

"Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment! "

Well, I have, and it don't work. So, this one's dead unless someone has a bright idea.

There is another way, but it relies on PixelChecksum, and that is not too reliable.

Oh well, never mind.


The AutoIt help file should be interrogated.The Editor should be SciTe.The forums should have been searched.

Share this post


Link to post
Share on other sites

I have experienced the same problem with trying to read from an MFC CListBox object. As the caveat goes don't expect to be able to read from non-standard Microsoft Windows controls (which I guess some MFC components are categorised as).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0