Re: [Sikuli-driver] [Question #253723]: How to Create a Repeatable Loop
Question #253723 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/253723 Status: Answered => Solved max confirmed that the question is solved: Thank you this works while True: # loop forever if exists(image, 0): click(some_image) wait(5) I will just open task manager and find the java process to manually abort when I want it to stop. Thanks a bunch -- You received this question notification because you are a member of Sikuli Drivers, which 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 #253723]: How to Create a Repeatable Loop
Question #253723 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/253723 Status: Open => Answered RaiMan proposed the following answer: while True: # loop forever if exists(image, 0): click(some_image) wait(5) this will look every 5 seconds and click if popup is there Since this runs forever, it has to be stopped with the abort key or by killing the app manually. If there is something on the screen while running, that identifies your main app, then this would stop automatically: while True: # loop forever if not exists(imageMustBeThere, 0): break # end loop if exists(image, 0): click(some_image) wait(5) or thinking positive ;-) while True: # loop forever if exists(imageMustBeThere, 0): if exists(image, 0): click(some_image) wait(5) -- You received this question notification because you are a member of Sikuli Drivers, which 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 #253723]: How to Create a Repeatable Loop
Question #253723 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/253723 Description changed to: Hi, I just downloaded Sikuli 2 days ago. The Language and constructs are all very new to me, I am not familiar with programming code. But the potential of this type of program is great for me, if I can learn it. For now, I have a very simple question. I have a program that runs overnight on my computer, but within the program the publisher has some unavoidable pop-ups that must be clicked to close or else the program is stagnant all night until I awake in the morning. I attempted to make a Sikuli script to recognize a unique image within the pop-ups and then click to close the pop-up. The script works, but it only works for 1 occurrence. I want it to run continuously overnight to close the pop-ups as they appear several times during the night. Here is the script I wrote 1) wait (image, FOREVER) 2) click (image) Right now once it clicks to close the pop-up, the sikuli program stops. I would like it to Wait until the Image appears then to perform the function of clicking to close the pop-up then to go back to waiting until the next time the pop-up appears to perform the function of clicking to close again repeat repeat and so on -- You received this question notification because you are a member of Sikuli Drivers, which 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 #253723]: How to Create a Repeatable Loop
Question #253723 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/253723 Description changed to: Hi, I just downloaded Sikuli 2 days ago. The Language and constructs are all very new to me, but the potential of this type of program is great. I have a very simple question. I have a program that runs overnight on my computer, but within the program the publisher has some unavoidable pop-ups that must be clicked to close or else the program is stagnant all night until I awake in the morning. I attempted to make a Sikuli script to recognize a unique image within the pop-ups and then click to close the pop-up. The script works, but it only works for 1 occurrence. I want it to run continuously overnight to close the pop-ups as they appear several times during the night. Here is the script I wrote 1) wait (image, FOREVER) 2) click (image) Right now once it clicks to close the pop-up, the sikuli program stops. I would like it to Wait until the Image appears then to perform the function of clicking to close the pop-up then to go back to waiting until the next time the pop-up appears to perform the function of clicking to close again repeat repeat and so on -- You received this question notification because you are a member of Sikuli Drivers, which 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 #253723]: How to Create a Repeatable Loop
New question #253723 on Sikuli: https://answers.launchpad.net/sikuli/+question/253723 Hi, I just downloaded Sikuli 2 days ago. The Language and constructs are all very new to me, but the potential of this type of program is great. I have a very simple question. I have a program that runs overnight on my computer, but within the program the publisher has some unavoidable pop-ups that must be clicked on to the close or else the program is stagnant until I awake in the morning. I attempted to make a Sikuli script to recognize a unique image within the pop-ups and then click to close the pop-up. The script works, but it only works for 1 occurrence. I want it to run continuously overnight to close the pop-ups as they appear several times during the night. Here is the script I wrote 1) wait (image, FOREVER) 2) click (image) Right now once it clicks to close the pop-up, the sikuli program stops. I would like it to Wait until the Image appears then to perform the function of clicking to close the pop-up then to go back to waiting until the next time the pop-up appears to perform the function of clicking to close again repeat repeat and so on -- You received this question notification because you are a member of Sikuli Drivers, which 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