jonny1234 Posted September 23, 2006 Share Posted September 23, 2006 Hi, I am trying to retrieve the items from a list control whose ClassNameNN is "TTntListBox.UnicodeClass1". I believe it is a Delphi control. So far, I can get the number of items in the list using: #include <GuiList.au3> $window_handle = WinGetHandle($window_title) $message_list_handle = ControlGetHandle($window_handle, "", $control_id_message_list) $num_messages = _GUICtrlListCount($message_list_handle) And I can select, for example, the first item in the list by using: _GUICtrlListSetSel($message_list_handle, 1, 0) But I can't get the text of the first item in the list. I have tried: $message_text = _GUICtrlListGetText($message_list_handle, 0) which just sets $message_text to 0 instead of setting it to the item text. I also tried just getting the length of the text of the first item, by using: $message_length = _GUICtrlListGetTextLen($message_list_handle, 0) which returned the value 1. But the text is much longer than 1 character. Please can you help. Thanks, Jonny Link to comment Share on other sites More sharing options...
jonny1234 Posted September 24, 2006 Author Share Posted September 24, 2006 I ain't gonna bump no more wit no big fat wooooo-man. But if anyone can help me with this TTntListBox problem, I'd really appreciate it. It seems strange that I can get the item count and can select items, but can't get the item text. Regards, Jonny Link to comment Share on other sites More sharing options...
Zedna Posted September 24, 2006 Share Posted September 24, 2006 Look at this my post.I think it would be the same problem... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jonny1234 Posted September 24, 2006 Author Share Posted September 24, 2006 Thanks for the reply Zedna. I have read your posts, but I can't figure out how to apply your solution to my problem. I compiled your DLL but couldn't get the example scripts to use it, so I'm just going to leave it. Thanks anyway. When things start to become as complicated as this, I usually just look for a simpler approach (even if it is less elegant), which is what I am doing at the moment. Regards, Jonny Link to comment Share on other sites More sharing options...
Zedna Posted September 24, 2006 Share Posted September 24, 2006 (edited) Note: that DLL is not mine it's from tweast.For get text from controls included in other process you need some more complicated API calls.AutoIt has ControlListview() - for standard ListView controlThat DLL (AutoitTreeViewExtension.dll) fills hole for missing ControlTreeView() in AutoIt - for standard TreeView controlSo I think you need some similar solution - for standard ListBox controlEDIT:for ListBox control you can use AutoIt's ControlCommand() & GetCurrentSelection - also for interprocess Edited September 25, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jonny1234 Posted September 25, 2006 Author Share Posted September 25, 2006 It appears to be a problem relating to Unicode strings. There are also two edit controls in the same application, one has ClassNameNN equal to "TEdit1" and the other is "TTntEdit.UnicodeClass1". I can retrieve the text of the first one, but not the second one which is a Unicode-aware control. It would seem that AutoIt cannot read the Unicode string. Can AutoIt read the text from Unicode controls? Regards, Jonny 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