Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-14 Thread Glowing Crystalline Entity
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Glowing Crystalline Entity posted a new comment: Ahhh, clever! :) And in fact... for the case of scrolling, if you know how much a wheel step moves the page, and you can figure out how far in total you need

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-13 Thread RaiMan
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 RaiMan posted a new comment: --- That's when it's nice to have a background thread that just does step 2 repeatedly. ... exactly what observeInBackGround is doing. Forgot to mention the ObserveScanRate. --

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-13 Thread Glowing Crystalline Entity
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Glowing Crystalline Entity posted a new comment: Yes indeed -- and even the pause-move of the above loop is, as you say, a bit risky: my current project's code still sometimes overshoots. It helps though to

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-13 Thread RaiMan
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 RaiMan posted a new comment: I understand what you mean, but you have to always keep in mind how SikuliX works: 1. make a screenshot 2. search the image in the screenshot 3. stop the search if found else con

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-13 Thread Glowing Crystalline Entity
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Glowing Crystalline Entity posted a new comment: Well, in this case, you scroll/wheel 10 steps, then wait for a second (or even a tenth), then scroll/wheel again... and it's very jerky. That's maybe just aest

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-13 Thread RaiMan
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 RaiMan posted a new comment: yes, rather academic and from my point of view not really applicable to this case. If interrupting should make sense, then you should be busy with something, that gets interrupte

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-13 Thread Glowing Crystalline Entity
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Glowing Crystalline Entity posted a new comment: I was specifically referring to this loop as "polling": while r.isObserving(): # until observing is stopped wheel(WHEEL_UP, 10) # wheel (might be WHEEL_DOWN

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-07 Thread RaiMan
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 RaiMan posted a new comment: SikuliX basically all over the place is constantly searching for some image on the screen (the visual approach) and the workflow waits for this to happen (you might call this po

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-07 Thread Glowing Crystalline Entity
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Status: Answered => Solved Glowing Crystalline Entity confirmed that the question is solved: This seems to be working, cool. :) I realize I was actually thinking about some sort of "interrupt" functiona

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-07 Thread Glowing Crystalline Entity
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Glowing Crystalline Entity confirmed that the question is solved: Thanks RaiMan, that solved my question. -- You received this question notification because your team Sikuli Drivers is an answer contact for

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-07 Thread RaiMan
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Status: Open => Answered RaiMan proposed the following answer: this works with 1.1.0: (tested on OS X 10.11) switchApp("myApp") # bring the app to front r = App.focusedWindow() # the search area imgStop

Re: [Sikuli-driver] [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?

2015-10-07 Thread RaiMan
Question #272154 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/272154 Summary changed to: [1.1.0] Is there a way to integrate a (background) observer with wheel()? -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. __