[Sikuli-driver] [Question #654244]: Waiting for image, type command, then waits again
New question #654244 on Sikuli: https://answers.launchpad.net/sikuli/+question/654244 I am looking for a simple script that will watch for an image, type the letter c until the image is gone. then wait for the image to come back again indefinitely. I have looked at many videos and tutorials and they all have huge amounts of code that all differ from each other. Settings.MoveMouseDelay = 0 running = True def runHotkey(event): global running running = False Env.addHotkey(Key.F1, KeyModifier.ALT, runHotkey) #for step in range(5): #for i in range(0,40): hover("1501408565660.png") for i in range(0,40): while exists("1501408565660.png")and running: click("1501409544348.png") click("1501408565660.png") if exists("1501413313685.png"): sleep#(30) if exists("1501410531123.png"): sleep#(30) if exists("1501413618782.png"): sleep#(30) This kinda works but there has to be a much better way. Also the script wont end right away when I try to stop it. It lags for more than 3 mins before stopping. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #654244]: Waiting for image, type command, then waits again
Question #654244 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/654244 layanor posted a new comment: This does work. However typing c is going very slowly. Is there a way to make this quickly respond? Also thank you for helping me out. Cutting all of that extra code out was very helpfull! -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #654244]: Waiting for image, type command, then waits again
Question #654244 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/654244 layanor posted a new comment: Thank you very much! I would like to randomize the keys it hits. One of six keys until the picture is gone. a,s,d,z,x,c Do I keep asking questions in this thread or a new one? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #654244]: Waiting for image, type command, then waits again
Question #654244 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/654244 layanor posted a new comment: Yes random. I know it is a odd request :) Also, how do I lock these key presses to a specific window so I can be doing other things as these are typing? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Question #655511]: Waiting to do 1 of 2 actions
New question #655511 on Sikuli: https://answers.launchpad.net/sikuli/+question/655511 Hello! I am starting up a game for my live stream viewers so they can bet points on a fighting game I made. https://gyazo.com/68eddbbdc23c238bcd6828977ddf0f79 Half of the code I have worked and will start up matches for me. "Lines 1 - 12" However, the rest of the code does not work. I checked the pictures and sikuli does see them. Key things to know about this is, while the match is being played out, sikuli needs to be idle until a victor has won. So the amount to wait is a bit random. Any help and improvement on this could would be great :) -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #655511]: Waiting to do 1 of 2 actions
Question #655511 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/655511 layanor posted a new comment: https://gyazo.com/e0a916124999037281e150a98d4603c5 The code is not seeing either pic. Is there something wrong here? The pic is on the screen for about 4 - 15 seconds. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #655511]: Waiting to do 1 of 2 actions
Question #655511 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/655511 layanor posted a new comment: Sorry! I forgot to add the rest of the code. https://gyazo.com/dd9520432ac9fa38ecb958e1ab4b3f33 -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #655511]: Waiting to do 1 of 2 actions
Question #655511 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/655511 layanor posted a new comment: Also, I want the code to start again for the beginning after its picked the winner. That way it is completely automated with setting up the matches and declaring winners! -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #655511]: Waiting to do 1 of 2 actions
Question #655511 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/655511 Status: Answered => Open layanor is still having a problem: I don't understand. The break is added like you suggested and does not work in this situation. In fact, this is the code you gave to me with some editing. Can you give examples for ending workfloow with "while" , "for", "if" ? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #654244]: Waiting for image, type command, then waits again
Question #654244 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/654244 Status: Answered => Open layanor is still having a problem: test -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #655511]: Waiting to do 1 of 2 actions
Question #655511 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/655511 Status: Answered => Open layanor is still having a problem: I rearranged the code a bit more but the loop will still not break on the first loop. https://gyazo.com/a5fec13cf88d61ff488821490c7f8b38 -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #654244]: Waiting for image, type command, then waits again
Question #654244 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/654244 Status: Answered => Solved layanor confirmed that the question is solved: Thanks Manfred Hampl, that solved my question. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #655511]: Waiting to do 1 of 2 actions
Question #655511 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/655511 Status: Answered => Solved layanor confirmed that the question is solved: Yes i have pulled a lot of code out of this. I think I have fixed most of the issues with the help I was given :) I am not going to ask a new question soon on how to speed up this code I have so far. Thank you all for the help! -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Question #656425]: Checking for a picture faster
New question #656425 on Sikuli: https://answers.launchpad.net/sikuli/+question/656425 https://gyazo.com/3946c51e2e658c1fb5b38eeda6c4a100 I have two pictures that need to be watched for every second "Player1 Player2". The way I have them set up now almost works but sometimes is too late to recognize the pictures. How do I shave off more time? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 Status: Answered => Open layanor is still having a problem: Where do I get the location numbers? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 layanor gave more information on the question: Okay I got the numbers. Now I need to know how to put in the code the correct way. https://gyazo.com/9fa5117497acd769ccc54593a7ac2c27 This does not work. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 layanor posted a new comment: https://gyazo.com/399c349648eee103c1ff7b53a2f2c6e1 Is this more of what you were saying? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 layanor posted a new comment: Why is there no way to edit comments here past the first question? Anyway... In the region palyer1 and player2 i took a small sample of the green and red bars. It aborts at line 4 so I am not sure why it stops. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 layanor posted a new comment: https://gyazo.com/2069c5350ce885ed80fd80f089159a38 We have made great progress! I did not set up the rest of the code yet as you suggested. I just set up the green and red bars so I could contact you quickly. The code is now working almost instantly when looking for these bars and that is great! However, both bars trigger Player2 actions and never Player1 actions. Are we missing something? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 Status: Answered => Open layanor is still having a problem: https://gyazo.com/6b7574aacfbf7db7c54c7d8efd78cf5a I have been working on this over the last few days. The fighting game is something I have made myself. I am able to change the green and red trigger images. So I changed them to blue and red. Then made them much smaller. I set up the region again and the code can see these images. Still, for some weird reason, Player 1 and Player 2 still get switched at times. The code is slow again even when adding in MinSimilarity Even with the progress I had, it seems I have made it worse while adjusting it. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 layanor posted a new comment: https://www.youtube.com/watch?v=s5P8N0ZMBVo I split up the code into different projects so I can work on them one at a time. This is a video to show you how it looks. I have everything very small and looking good. I realize now that I put this all into the same project "FightBot" that this script will slow down. Do you have any suggestions on any of it as I rebuild this into one script? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 Status: Answered => Open layanor is still having a problem: https://gyazo.com/deb1c6d766678df409c04c1a6527521d Each of the 4 sections of code now works and are fast. But the issue I thought I would have has happened. It is slow again with all four in one code. All region pics are now super small and the larger buttons can be smaller but I didn't see reason to do that with them as those were always fast and only get triggered when the code needs to call on them Also, there is an issue now where I believe parts of the code is looping. I have tried to continue and break commands but it seems these do not work and just either crash the code or the code ends with no errors. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp