sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #53644
[Question #686932]: Is it possible to pass a variable to the Region command?
New question #686932 on Sikuli:
https://answers.launchpad.net/sikuli/+question/686932
Hi,
I am trying to dynamically create regions on the screen at different locations and want to pass the Region() command a variable containing the co-ordinates of the new region.
base_loc = str("("+x_cord_s+","+y_cord_s+","+w_const_s+","+h_const_s+")")
reg2 = Region(base_loc)
However when I do that it returns an error:
[error] script [ build_index ] stopped with error in line 105
[error] TypeError ( org.python.proxies.sikuli.Region$Region$3(): 1st arg can't be coerced to boolean, java.awt.Rectangle, org.sikuli.script.Region )
[error] --- Traceback --- error source first
line: module ( function ) statement
105: main ( <module> ) reg2 = Region(base_loc)
[error] --- Traceback --- end --------------
If I enter the exact same coordinates manually it works. I've tried passing a string variable and an integer variable neither worked. My question is can this be done and if it can How?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.