Drafts Action Directory

Succeed or Fail

Last update about 2 months ago - Unlisted
Install

Steps

  • script

    //Build the prompt
    const buttonSucceed = "Return Success";
    const buttonFail = "Return Failure";
    
    let promptSelect = Prompt.create();
    promptSelect.title = "Select Outcome";
    promptSelect.addButton(buttonSucceed);
    promptSelect.addButton(buttonFail);
    promptSelect.isCancellable = false;
    
    //Get the result
    if (promptSelect.show())
    {
    	if (promptSelect.buttonPressed == buttonSucceed)
    	{
    		//Do Nothing
    	}
    	if (promptSelect.buttonPressed == buttonFail)
    	{
    		context.fail();
    	}
    }
    

Options

  • After Success Default
    Notification Info
    Log Level None
Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.