sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #30113
[Question #260878]: Sikuli Find Do and Loop
New question #260878 on Sikuli:
https://answers.launchpad.net/sikuli/+question/260878
I been working on image recognition for a game and i’m would like to get my script to check for multiple images, if any of the images is found i would like it to make some actions, after finishing all set actions i want it to start checking again for the same set of images until it cannot find any other image if that kind.
So the idea of work flow i got is the next:
WorkFlow
Check For a Set of Image Present on Screen (Img1,Img2,Img3,Img3)
If any image Present
Do the next
click(Pattern("UpgradeArrow.png").exact().targetOffset(-30,7))
wait(Pattern("UpgradeButton.png").similar(0.90),FOREVER) ---- in this case i don’t know how to set it to check until the image pop up
doubleClick(Pattern("UpgradeButton-2.png").similar(0.90))
wait(Pattern("OriginalTimeUpgrade.png").similar(0.95),FOREVER)
doubleClick("UpgradeButton-3.png")
wait(Pattern("HelpUpgradeResearch.png").similar(0.90),FOREVER)
wait(2)
click(Pattern("HelpUpgradeResearch-1.png").targetOffset(-33,0))
----- Here is were one Action finishes--- and i want it to wait until another image pop ups. When that image popups i want to do the next action.
upgrade = exists(Pattern("UpgradeArrow.png").similar(0.97))
lvl_up = exists("BuildingPurpleBar.png")
if lvl_up:
wait("FreeBuildingUpgrade.png",FOREVER)
click("FreeBuildingUpgrade.png")
-------After Finishing up With this Second Action i want the script to start checking again for the Initial Set of Images and loop until no more Images of those 4 are found----
Thank You
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.