Confirm

From UBot Studio
Jump to: navigation, search

$Confirm is a System Function.

The function displays a yes/no confirmation box that returns true if yes is chosen.

Message: The message that will appear in the prompt.


Example

set(#confirm, $confirm("Click Yes to Type an Item into the field."), "Global")
if($comparison(#confirm, "=", "true")) {
    then {
        type text(<username field>, "True!", "Standard")
    }
    else {
        type text(<username field>, "False!", "Standard")
    }
}

Running the script prompts a confirm dialog that will wait for you to click Yes or No.

Clicking Yes returns "true", and that is set to a variable. Choosing No returns "false", which is then set to the variable.

The variable is then used in the if then else function to determine if the then command should be run or the else command should be run.


Prmpt0.jpg


In this script, choosing Yes types the word "True!" into the first field on the page. Choosing No types the word "False!" into the firs field of the page.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox