SikuliX1 icon indicating copy to clipboard operation
SikuliX1 copied to clipboard

Let popup auto-terminate if some image gets visible

Open roboraptor opened this issue 4 years ago • 9 comments

Would it be possible to have interaction with user but still check for something and if found possibly close that interaction before user (needs to) interact?

Something like reply = Do.popAsk("Do this or that","Do something",15, exists=Pattern(img)) if reply == None: # popAsk Timeouted after 15s ( already works 👍 ) if reply == PaternExists: # popAsk Found pattern and continued without user interaction ( add this feature please 🙏 ) if reply: # popAsk Yes button pressed ( already works 👍 ) if not reply: # popAsk No button pressed ( already works 👍 )

roboraptor avatar Jun 15 '21 09:06 roboraptor

yes - good idea.

RaiMan avatar Jun 17 '21 07:06 RaiMan

Also something like reminder on that interaction if it is waiting for too long? Like when u have pretty long automation process for like 30+ minutes and somewhere in the middle you need to wakeup the user ~~form~~ from the work on other machines.

  1. Visual Blinking screen/popup like use red/green highlight on and off

  2. Sound use that java toolkit make sound thing or powershell command mediaplayer thing

roboraptor avatar Jun 17 '21 08:06 roboraptor

Also something like reminder on that interaction if it is waiting for too long?

Please create a separate issue.

... but it is not really clear what you mean. especially this:

somewhere in the middle you need to wakeup the user form the work on other machines.

LOL, got it : user form should read user from

RaiMan avatar Jun 17 '21 11:06 RaiMan

@roboraptor (please comment)

About the Pattern parameter for popup's:

  • the return value would be None/null (same as for timeout happened)
  • if the image is already visible: should the popup get visible at all?
  • if timeout and Pattern are given: the popup will close latest at timeout, if the image does not get visible

RaiMan avatar Jun 17 '21 11:06 RaiMan

@RaiMan

* the return value would be None/null (same as for timeout happened)
  • It would be nice to have other value to return to know that it was the pattern and not the timeout but this is also usable.
* if the image is already visible: should the popup get visible at all?
  • popup should be first, then check for picture and decide to close the popup or check again
    • if the image which is searched for in the popup is already visible, it will make the popup just blink
* if timeout and Pattern are given: the popup will close latest at timeout, if the image does not get visible
  • Yes <3 It has popup and searches. If it times out it times out.
    • timeout given to popup as that 3rd number argument (specified by user) should also be the timeout for searching for pattern (make sense the most)

roboraptor avatar Jun 17 '21 12:06 roboraptor

@roboraptor ok, thanks.

RaiMan avatar Jun 18 '21 16:06 RaiMan

Would it be possible to also impement vanish function? so it would be

Let popup auto-terminate if some patern gets visible or disappear

roboraptor avatar Jun 23 '21 07:06 roboraptor

OR EVEN! ...This idea gives me goosebumps :D (I'm not a professional programmer I'm just trying to understand syntax and work with it.)

That some kind of popup could be treated as something like a "function"? That you create popup jus as a window with buttons but you actually continue in some code so it can actually use all exist, wait, find, click, type, match thingies, buttons could work as an interrupt

<Some code before> answer = Do.ComplexPopup("Popup text","Popup Title",<timeout>): # creates popup window ....<something something> ....if something: ........Exit.ComplexPopup("4") # closes the popup and sets answer to 4 ....Exit.ComplexPopup("None") # closes the popup and sets answer to None (as it would timeout) <Some code after>

There should also be possibility to use textbox popups, choose from list popups, yes/no buttons popups

THIS WHOLE THING IS JUST AN IDEA (and I just want your opinion?)

Like... just letting the popup be able to check if some patern gets visible or disappear is WAY MORE than anybody would possibly need (except me) and I think Sikuli is Awesome ❤️

roboraptor avatar Jun 23 '21 07:06 roboraptor

understood.

Due to private priorities, I cannot give any commitment for the implementation/availability.

When relevant, I will give the status here.

RaiMan avatar Jun 23 '21 12:06 RaiMan