Sikuli popup

Asked by Kunal

I am running an skl file which generates a popup in script. I am facing a problem that if i click anywhere on the screen, the focus is lost and the popup goes in background.

Is there a way that i could keep the popup always in front till the time it is handled?

Hoping for an early reply.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

no, not possible with popup().

have a try with Sikuli extension Guide - feature dialog(): http://sikuli.org/docx/extensions/sikuli-guide/index.html#sikuli-guide

Revision history for this message
Kunal (kunalzunjarrao) said :
#2

I need to return a value yes or no(Y/N) to a variable in Sikuli script. dialog() will not solve my problem. Is there an alternative?

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Uuuups, that is a problem with the current version.

I am supporting the developers in testing pre versions and I have one of the next guide version.

There it is possible to say:

dialog("please click Yes or No", "The Question", buttons=["Yes", "No"])
retval = show()
if retval == "Yes":
 pass # replace with your code
else:
 pass # replace with your code

If you want to try:

I have uploaded a ready preversion guide.jar at
https://files.me.com/rhocke/seyzc6 (guide_1.4.3_preversion.jar)

download it and place it in %APDATA%\Sikuli\extensions (on Windows). You may save the original guide.jar before.

Revision history for this message
Jeff Sant (sant-jeff) said :
#4

Dear Raiman,

Is the multi keyword arguments feature in dialogue available in the latest Guide version, as i am unable to use it with yes , no feature of dialogue.

If not can you please upload the pre release of guide as your link mentioned is not working.

Thanks

Revision history for this message
RaiMan (raimund-hocke) said :
#5

I have uploaded a version from April 3rd, hoping it contains this feature:
https://files.me.com/rhocke/kura2y (guide.jar)

download it and place it in %APPDATA%\Sikuli\extensions (on Windows). You may save the original guide.jar before.

Revision history for this message
Jeff Sant (sant-jeff) said :
#6

Awesome, works great. Can i change the colors of the dialog box? Right now its in yellow and orange kind of combination.

Thank you so much RaiMan, for your support

Revision history for this message
RaiMan (raimund-hocke) said :
#7

This is currently not an option. This is hard wired. And it is still in the current development source.

If you know how to program in Java, it is rather simple to make yourself your own version of guide.jar (as I did with the version you downloaded).

If you do not want to do that, you have to wait until the next version comes out with a new version of guide. Meanwhile you might post a request bug for that feature.

Revision history for this message
RaiMan (raimund-hocke) said :
#8

@Jeff Sant
Be aware, that the API of Sikuli Guide will be heavily revised and extended against the version currently in the docs. So I recommend not to invest too much in the version 1.4.2 or the preversion you downloaded.

Can you help with this problem?

Provide an answer of your own, or ask Kunal for more information if necessary.

To post a message you must log in.