sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37789
Re: [Question #292358]: Look here for (w OR a OR s OR d) and type that.
Question #292358 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/292358
Status: Open => Answered
RaiMan proposed the following answer:
def checkLetter(reg): ----------------[am I linking an actual image of the region here, or typing 'reg'?]
... this is a function definition to use later. reg is a parameter variable, that will be filled with a real region, when called later.
if reg.exists(imgA, 0): return "A" --------------[am I typing imgA or actually linking the image of the 'A'
... that depends on your personal scripting rules.
I usually do it this way:
imgA = "imgA.png"
this can easily done in the IDE by
writing in a blank line
imgA =
and then use the capture button, to capture an image of the respective A (automagic ;-)
These definitions can be inside or outside of the function.
for reg in (reg1, reg2, reg3, reg4, reg5): ------------------[am I
linking an actual image of the 5 region's
regN have to be region definitions of the boxes (different options for that), but basically:
reg1 = Region(x, y, w, h)
or any other way to define the regions
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.