Deepti Posted September 28, 2010 Share Posted September 28, 2010 (edited) Hi All, I am trying to get the contents of a Grid control. The Grid has data in X*Y form where X=rows and Y=columns. Can anybody help me with this? Edited September 28, 2010 by Deepti Link to comment Share on other sites More sharing options...
ajit Posted September 28, 2010 Share Posted September 28, 2010 (edited) Hi Check out this link http://www.autoitscript.com/forum/index.php?showtopic=79924&st=0&p=575780&hl=read%20grid%20contents&fromsearch=1&#entry575780 Run clipbrd to view contents. Edited September 28, 2010 by ajit Link to comment Share on other sites More sharing options...
Deepti Posted September 28, 2010 Author Share Posted September 28, 2010 HiCheck out this linkhttp://www.autoitscript.com/forum/index.php?showtopic=79924&st=0&p=575780&hl=read%20grid%20contents&fromsearch=1&#entry575780Run clipbrd to view contents.Thanks for the quick response Ajit.But Send("{CTRL}c")wont work here. I mean i am not able to copy anything from the Grid. How do we deal with that? Link to comment Share on other sites More sharing options...
ajit Posted September 28, 2010 Share Posted September 28, 2010 (edited) Deepti Try manually copying it, i.e. "control + C" and see the contents, run clipbrd to see what it has copied. 1. Get grid containing window by title. You can use this to check its active state. Then use mouseclick on the grid. 2. Send("{PGUP}") to get first row or whatever. Use other send commands to scroll up and down. 3. Send("^c") to copy its contents. 4. ClipGet() to retrieve your data. Ajit Edited September 28, 2010 by ajit Link to comment Share on other sites More sharing options...
meisandy Posted September 28, 2010 Share Posted September 28, 2010 (edited) Deepti, "{CTRL}" isn't a propper command! I'd of been suprissed if any body got it working. So, here's a list of send commands and their definitions: "^" - Ctrl "+" - Shift "!" - Alt "#" - Win So you need to use this as a key: Send("{DOWN}"); Selects the cell bellow - you know all that stuff Send("+{DOWN}"); Selects multiple cells Send("^c"); copy's selected Send("^p"); pastes from clipboard Kind Regards, DjATUit PS If you get stuck please don't hesitate to ask! Edited September 28, 2010 by DjATUit Link to comment Share on other sites More sharing options...
Deepti Posted September 29, 2010 Author Share Posted September 29, 2010 Hey, Send("{TAB 4}") ; brings control to the first cell of the row. Send("^c") $content=ClipGet() MsgBox(0, "Cell contains:",$content) When i check the clipboard, all i can see is "$content" which should not be the case. Pls suggest if i am doing anything wrong in this. If i manually try to copy the contents of the cell, i am able to do it only after i select the content(by mouse drag). Should I be using something like MouseClickDrag() then? 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