Thanks:  0
Likes:  0
Dislikes:  0

# Thread: Set position on cell in grid

1. ## Set position on cell in grid

I use function PSGrid like:
PSGrid Click, "Name=xxx", "Coords=100, 150"

But i know column, row and cell text - How can i set position without coordinates?

Code:
PsGrid Click, "Name=xxx", "Col=4;Value=aaa;Row=5"
doesn't work!

2. ## Re: Set position on cell in grid

Write a function to click a particular spot when given the r,c coords (My robot is rusty so I use psuedo code)

function(r,c)

baserow1 = 25
basecolumn1 = 40

These are the number of pixels between the center of r1 and r2, c1 and c2
rowoffset = 10
coloffset = 40

These would be the pixel x,y postions clicking in the center of r1,c1

To click any cell in the grid, calculate the click position using the base + offset
ie:

row = baserow1 + (r*rowoffset)
col = basecol + (c*coloffset

Click(row,col)

Note that to get your basis, you must find the starting x,y for r1,c1, plus the offset between r,c.

You will need to tweak the numbers a bit a first, but if the first and last r,c are good, the rest should be

uss
x = r

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.