How to use setRaster() and getCell()

Asked by Armel

Hy,

j've try this script :

R = SCREEN.setRaster(3,3)
R.highlight(5)

The result is OK. I visualize a part (0,0) on the screen

Now :

R1 = R.getCell(1,1)
R1.highlight(5)

Problem : I visualize the same area !?!?

Normaly, I must see central zone (1,1)

Where is the problem ?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

wrong usage:

R = SCREEN.setRaster(3,3)

R now is the upper left third of the screen (the raster "knowledge" is stored in SCREEN)

R.getCell(1,1) hence ist the upper left third of the screen as well, since R does not have a raster and hence is itself.

usage:
setRaster(3,3) # now SCREEN has the raster
getCell(1,1) # is the middle third of the screen

SCREEN is never needed with undotted Region methods, since this is the default region in the standard usage meaning the Screen(0)

Revision history for this message
RaiMan (raimund-hocke) said :
#2

Can you help with this problem?

Provide an answer of your own, or ask Armel for more information if necessary.

To post a message you must log in.