Flipper Posted July 6, 2006 Share Posted July 6, 2006 (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 July 6, 2006 by Flipper Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 6, 2006 Share Posted July 6, 2006 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 Link to comment Share on other sites More sharing options...
System Tester Posted July 6, 2006 Share Posted July 6, 2006 (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 July 6, 2006 by System Tester The AutoIt help file should be interrogated.The Editor should be SciTe.The forums should have been searched. Link to comment Share on other sites More sharing options...
Skruge Posted July 6, 2006 Share Posted July 6, 2006 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] Link to comment Share on other sites More sharing options...
System Tester Posted July 7, 2006 Share Posted July 7, 2006 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. Link to comment Share on other sites More sharing options...
System Tester Posted July 7, 2006 Share Posted July 7, 2006 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. Link to comment Share on other sites More sharing options...
trickymint Posted August 13, 2012 Share Posted August 13, 2012 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). Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now