Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
TestMechanic proposed the following answer:
David,
As far as I understand you have some workflow that have occasional
images only at some steps. Why not just at those places use this logic
def WaitMainOrOcc
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
Manfred Hampl proposed the following answer:
If your primary logic is more complicated that just [:wait - click:], then I
would like to go back to my recommendation with an obse
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI gave more information on the question:
click; wait; click; wait; click; wait; click; type; click; click; type;
click; click; (unexpected/occasional image1); click, wait, click wait,
click; (
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI gave more information on the question:
Yea, the specific issue for this scenario is that there will be times where
multiple main (expected) images are true.
So having a code sequence of wa
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI gave more information on the question:
I am going to try to use ndinev's code while making the sign in page an
unexpected page (so the sign in image will not be a main image). testing
now.
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Answered => Open
DAVID MASTROIANNI is still having a problem:
I actually did that deliberately because (full disclosure)
After Image E is a sign in button
at which point I have my script type tex
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
Manfred Hampl proposed the following answer:
You modified ndinev's suggestion in a wrong way.
You just have to take it as it is and insert the image names, and this should
work.
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI gave more information on the question:
when I watched the Youtube tutorials
there is a game automation example
it has a working if exists
but the image is already on the screen, so its just
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI gave more information on the question:
ndinev, I'm really only concerned with the occasional unexpected images, not
the main images or main sequence.
if ever appear
then click
if doesn't ap
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Answered => Open
DAVID MASTROIANNI is still having a problem:
Hi ndinev,
Yes I do have images A through Z and Images 1, 2 and 3.
==
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
TestMechanic proposed the following answer:
Hi David,
I have one idea that may be helpful. Please note I am giving you "not
tested" code. Also assuming you have main imagesA-Z a
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Answered => Open
DAVID MASTROIANNI is still having a problem:
Yes @Roman, sorry for the lack of code and confusion, and thank you for
helping me thus far.
My script consists only of:
Wait(Image
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
Roman Podolyan proposed the following answer:
You have to figure where to put it in your script. As I don't see you
full code, I can't. If, say, your code should work first and
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Answered => Open
DAVID MASTROIANNI is still having a problem:
Settings.MinSimilarity = 0.95
def try_click(our_image):
try:
click(our_image)
except FindFailed:
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Roman Podolyan proposed the following answer:
I think you better not use onAppear / observe() for this purpose. They
are expected to wait for image until it appears (that is like wait for
image1 until it appe
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
Roman Podolyan proposed the following answer:
Sorry, David, you weren't clear with requirements.
Ok, here is a version with infinite loop.
==
# Setting similarity up for my
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI gave more information on the question:
1|def myHandler(e):
2|click(Pattern("1506689688440-1.png").targetOffset(44,-61))
3|onAppear(Pattern("1506689688440-2.png").targetOffset(44,-61)
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Answered => Open
DAVID MASTROIANNI is still having a problem:
Instead of print "image1.5 appeared"
Can I use click("image1.5")
I wish to have my program run while I'm away from the computer, ri
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
Manfred Hampl proposed the following answer:
Maybe the following approach works:
Split the logic into two parts:
1. the main logic, as already programmed by you
wait("image1",
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Answered => Open
DAVID MASTROIANNI is still having a problem:
def try_click(our_image):
try:
click(our_image)
except FindFailed:
pass
try_click(Pat
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
Roman Podolyan proposed the following answer:
==
def try_click("1506689574881.png"):
try:
click("1506689574881.png")
except FindFailed:
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI gave more information on the question:
I am trying to write code at the beginning of the script that says hey:
If image1, image2, or image3 ever show up, take action x,y,z
which will simpl
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Answered => Open
DAVID MASTROIANNI is still having a problem:
[error] script [ PROGRAM.AUTOMATION ] stopped with error in line 1 at column 14
[error] SyntaxError ( 'no viable alternative at input
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
DAVID MASTROIANNI posted a new comment:
@roman, is this possible for multiple images?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.
__
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Roman Podolyan posted a new comment:
This code clicks an image if finds it and does nothing if image is not present:
==
def try_click(our_image):
try:
click(our_image)
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Status: Open => Answered
masuo proposed the following answer:
Try this codes.
def handler1_5(event):
click(event.getMatch())
event.stopObserver()
r1 = Region(100,100,300,300)
r1.highlight(1)
r
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Description changed to:
My code basically looks like:
wait("image1", FOREVER)
click("image1)
wait("image2", FOREVER)
click("image2")
Sometimes there is an "image1.5" or a known image at a random time.
What
Question #658728 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/658728
Summary changed to:
How to work around an occasional image
Description changed to:
My code basically looks like:
wait("image1", FOREVER)
click("image1)
wait("image2", FOREVER)
click("image2")
Sometimes the
28 matches
Mail list logo