Jump to content

Recommended Posts

Posted (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 by Deepti
Posted (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 by ajit
Posted

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.

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?

Posted (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 by ajit
Posted (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 by DjATUit
Posted

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?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...