@Brian
Thanks for the reminder ;-)
Always wanted to implement something, that avoids this (ugly) coding.
From tomorrow's build 1.1.0 on this will do what you have done:
(no need to import anything)
r = selectRegion()
img = r.saveCapture(getBundlePath()) # the initial capture
while True:
while r.exists(Pattern(img).similar(0.99), 0):
wait(1)
if Mouse.at().x < 10:
exit()
wait(1)
img = r.saveCapture(getBundlePath()) # the follow-up capture after a change
I added a termination solution:
if you move the mouse to the screen's left edge, the script will terminate.
absolute-path-of-imagefile = r.saveCapture( [path [ , name ] ] )
will save timestamped .png files as:
nothing given: <temp>/Sikulix/sikuliximage-1427279736087.png
path given: <path>/sikuliximage-1427279736087.png
path and name given: <path>/<name>-1427279736087.png
and return the absolute path of the created .png or "" if failed for some reason.
@Brian
Thanks for the reminder ;-)
Always wanted to implement something, that avoids this (ugly) coding.
From tomorrow's build 1.1.0 on this will do what you have done:
(no need to import anything)
r = selectRegion() getBundlePath( )) # the initial capture Pattern( img).similar( 0.99), 0): getBundlePath( )) # the follow-up capture after a change
img = r.saveCapture(
while True:
while r.exists(
wait(1)
if Mouse.at().x < 10:
exit()
wait(1)
img = r.saveCapture(
I added a termination solution:
if you move the mouse to the screen's left edge, the script will terminate.
absolute- path-of- imagefile = r.saveCapture( [path [ , name ] ] )
will save timestamped .png files as: Sikulix/ sikuliximage- 1427279736087. png sikuliximage- 1427279736087. png <name>- 1427279736087. png
nothing given: <temp>/
path given: <path>/
path and name given: <path>/
and return the absolute path of the created .png or "" if failed for some reason.