← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #161673]: Unable to understand region Behaviour

 

Question #161673 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/161673

Description changed to:
I am Using Sikuli in JAVA

Few Doubts Related to Region::
--------------------------------------------------------
1)
Creating new region..
Suppose i want to create a Region with Some fixed values...
How can i do it??
I tried this way...
Region R;
R.x=100;R.y=200;R.h=500;R.w=600

But its not working..gives Error that R is not initilized & if i Initilize it to null then while assigning coordinates...
It gives Error..cant assin value to null.

2)
r is a region with some value, Say r(300,1200)h=100 & w=1500
now i create a copy of Region r
Region select=r;
& make some Alteration in select region.
select.h=5;select.x=select.x-2;select.y=100;

But when i check the value of Region r ...
the changes made in Region select are reflected in Region r.
ie value of both Region r & select are same.

Which was not expected(for me)..
So how to Solve this??


3) Need to understand behavior of Region.Below() function
Just explain.. What is @Screen(0) E:Y, T:3.0 ?? (Look below Sample code & Output)
 
CODE:
System.out.println("Value OF region r "+r);
Region select=r.below();
System.out.println("Value OF region Select "+select);

O/P:
------
Value OF region r Match[999,462 53x49] score=0.96, target=center
Value OF region Select Region[999,511 53x257]@Screen(0) E:Y, T:3.0

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.