Question #497368 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/497368
Hatim gave more information on the question: Actually what you provided seems very reasonable to me. But unfortunately I didn't get the time to try it out until now. Hopefully to test it tonight or tomorrow morning. I'll let you know asap. Thanks a lot for your concern really On Thu, Mar 2, 2017 at 9:30 PM Hatim <[email protected]> wrote: > Your question #497368 on Sikuli changed: > https://answers.launchpad.net/sikuli/+question/497368 > > Status: Answered => Open > > You are still having a problem: > OK great. I'll try it out. > Thanks a lot > > On Thu, Mar 2, 2017 at 1:19 AM, RaiMan < > [email protected] > > wrote: > > > Your question #497368 on Sikuli changed: > > https://answers.launchpad.net/sikuli/+question/497368 > > > > Status: Open => Answered > > > > RaiMan proposed the following answer: > > Since everything with SikuliX is visual, it depends, how you are able to > > visually track activity/inactivity. > > > > Another option might be, to continually track the mouse position and do > > your job, if the mouse is no longer moved for some time. > > > > lastPos = Mouse.at() > > lastMove = time.time() > > maxWait = 15 #seconds > > saved = False > > while True: > > wait(1) > > currentPos = Mouse.at() > > if lastPos.x == currentPos.x and lastPos.y == currentPos.y: > > if lastMove + maxWait < time.time and not saved: > > #here you should do your actions > > saved = True > > else: > > lastMove = time.time() > > lastPos = currentPos > > > > ... you might add something, to make this endless loop interruptible - > > otherwise you have to kill it. > > > > -- > > If this answers your question, please go to the following page to let us > > know that it is solved: > > > https://answers.launchpad.net/sikuli/+question/497368/+confirm?answer_id=0 > > > > If you still need help, you can reply to this email or go to the > > following page to enter your feedback: > > https://answers.launchpad.net/sikuli/+question/497368 > > > > You received this question notification because you asked the question. > > > > -- > You received this question notification because you asked the 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 : [email protected] Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp

