YogeshDikshit Posted June 28, 2010 Share Posted June 28, 2010 HI! Can anybody pls help me - how to get the selected value from a read-only grid control? The grid control has X(rows) and Y(columns) which can vary if needed. Does Autoit have any function to do this? Thanks, Yogesh Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 28, 2010 Share Posted June 28, 2010 Grid controls are drawn by their parent applications without using the standard Windows APIs. As a result, AutoIt has no way to know how to interface with them. If you can navigate around in it with the keyboard, then you can ControlSend() "{TAB}"/"{UP}"/"{DOWN}" stuff to move around, and then ControlSend() "^c" to copy text. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
YogeshDikshit Posted June 29, 2010 Author Share Posted June 29, 2010 Grid controls are drawn by their parent applications without using the standard Windows APIs. As a result, AutoIt has no way to know how to interface with them. If you can navigate around in it with the keyboard, then you can ControlSend() "{TAB}"/"{UP}"/"{DOWN}" stuff to move around, and then ControlSend() "^c" to copy text. Thanks for your reply. Using Autoit Window Info following info is displayed.... So can we use any of these info (without using coords OR Mouse Move/Click events OR Send() function)? because I don't want the script to be hardcoded <<Window>> Property Value Title MyWindow Class classMyWinMainFrame Position 612, 1 Size 626, 650 Style 0x14CF0000 ExStyle 0x00000100 Handle 0x000307EE <<Control>> Property Value Class SysListView32 Instance 1 ClassnameNN SysListView321 Name Advanced Mode [CLASS:SysListView32; INSTANCE:1] ID 1001 Text List1 Position 12, 60 Size 411, 304 ControlClick Coords 71, 80 Style 0x5601018D ExStyle 0x00000325 Handle 0x0002085C BR, Yogesh Link to comment Share on other sites More sharing options...
picaxe Posted June 29, 2010 Share Posted June 29, 2010 Au3Info shows it is a listview, so try adapting this example. Link to comment Share on other sites More sharing options...
YogeshDikshit Posted June 29, 2010 Author Share Posted June 29, 2010 Au3Info shows it is a listview, so try adapting this example.Thank you Sir. Thank you very much.....Now I am facing the problem to identify the selected item from the list. The selection is made through mouse or keyboard; is there any function to get the selected / focused item from the list...? Link to comment Share on other sites More sharing options...
picaxe Posted June 29, 2010 Share Posted June 29, 2010 is there any function to get the selected / focused item from the list...?_GUICtrlListView_GetItemSelectedsee help file example. Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 29, 2010 Share Posted June 29, 2010 Thanks for your reply. Using Autoit Window Info following info is displayed.... <snip> <<Control>> Property Value Class SysListView32 Instance 1 ClassnameNN SysListView321 Name Advanced Mode [CLASS:SysListView32; INSTANCE:1] For the record, that's NOT a grid control... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
YogeshDikshit Posted July 1, 2010 Author Share Posted July 1, 2010 Thank you guys... Thanks a lot for your guidance 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