Re: [Sikuli-driver] [Question #656425]: Checking for a picture faster
Question #656425 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/656425 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- 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
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: Open => Answered Manfred Hampl proposed the following answer: Changing MinSimilarity will not help making processing of the script faster. Key for speeding up the script is making the endregion and selectregion as small as possible. -- 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 Manfred Hampl proposed the following answer: I do not have the program that you want to control, so I cannot really tell why your script is not doing what you expect. You have to do some debugging yourself, and eventually do some further fine tuning. Some ideas: Check whether only player1 image is found or only player2 image or both Maybe you have to increase the minimum similarity before the "playerX = endregion.exists(...)" statements by insering a Settings.MinSimilarity = 0.8 #(or any other suitable value) line. -- 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 Manfred Hampl proposed the following answer: I do not see the definition of endregion in your latest script. I assume the following might work: Settings.MoveMouseDelay(0.0) endregion = Region (400, 30, 100, 50) # adapt the numbers to have a rectangle where the green or red bar will appear (the smallest reasonable one) winnerregion=Region (500, 100, 100, 50) # adapt the numbers to have a rectangle where the "Set winner option" button will appear yesregion=Region (600, 100, 100, 50) # adapt the numbers to have a rectangle where the "yes" button will appear while True: setAutoWaitTimeout(0.1) player1 = endregion.exists("greenbar.jpg") player2 = endregion.exists("redbar.jpg") if player2: setAutoWaitTimeout(0.0) winnerregion.click(set winner option image 1) winnerregion.click(set winner option image 2) wait (6.0) if yesregion.exists(yes image) click() wait (5.0) continue ... -- 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/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 Status: Open => Answered Manfred Hampl proposed the following answer: 1. A statement like "This does not work." does not stimulate anybody to help further. Can't you tell what happens if you try? 2. It seems that my wording was not clear enough, and you misunderstood my intentions. Whenever you search for an image (including a click action which also does an search) , make the region where the search is executed as small as possible, and also make the image to search for as small as possible, but big enough that it is not inadvertently found elsewhere inside the search region. This is relevant not only for the "endregion", but also for all other click (Set winner option...) actions. The way that you did your region definition is counterproductive, because you do it with another search inside the loop, and this will probably even slow down the script. My suggestion: define the region where the green or red bar appears outside the while loop, and not by searching for an image but by giving coordinates - and as small as possible. If possible do the same for the region where "set winner option" will appear, and if possible also for the "yes" boxes. I understood that the winner is announced by either a green or a red bar on a certain location on the screen. I do not see the need to search for the complete red/green bar across the whole screen, maybe it is sufficient to check a small part of the area where that bar appears for red respectively green color. -- 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 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 Status: Needs information => Answered Manfred Hampl proposed the following answer: A general hint: The smaller the region where you search for the image, the faster the search. E.g. If you know that the green or red bar for the winner is always shown on a specific position, then define a region around this position endregion=Region(x,y,w,h) and do a endregion.exists(...) instead of searching the whole screen with exists(...). -- 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: Open => Needs information masuo requested more information: Nobody know which line of code you want to make faster. You should confirm response time each line of codes, and decide which line of code you want to do faster. -- 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