Provision of a CONFIRM facility

Asked by Tracy Gilmore

I have a large script which is punctuated with PopUp statements to enable a human observer to keep the screen active (and them awake).
Rather than just issuing a prompt it would be better if I could provide an escape option by way of a CONFIRM command (akin to the JavaScript CONFIRM command), that offers OK and CANCEL buttons and returns a Boolean.

Prompt "Press OK to continue, Cancel to terminate).

Question information

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

use the input() feature instead.

Revision history for this message
Tracy Gilmore (tracy-gilmore) said :
#2

The input() feature provides the user with an input text box as well as the OK/Cancel buttons. In the described scenario, whilst it would provide the facility I require, the input feature text field is unnecessary and distracting. I remain on the opinion that the Sikuli language is missing a Confirm() feature - but will close the question.

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

Since the input() has a default value, you can put an "anti-distracting" text into the input field ;-)

Nevertheless, I put it on the list to add an option for that to the popup().