AskYesNoPrompt

Description

  • Pop-up with "Yes" or "No" options.
  • A float value of "0" (No) or "1" (Yes) will be returned in "AskYesNo" depending upon the user's selection.
  • AskYesNoDefault should be set to "0" (No) or "1" (Yes).

Special Characters

  • @ or \n (New line)
  • @ @ or \n\n (Skip a line)

Example

AskYesNoPrompt.png
 

AskYesNoDefault = 0;

AskYesNoPrompt = "This is an AskYesNoPrompt pop-up message";
Store.FloatAt.TempAnswer = AskYesNo;

IF.Store.At.TempAnswer.Value.THEN = {
//Things to do if the user selects "Yes";
};

Script AskYesNoPrompt answer (suppress pop-ups)

The suggested solution from Andy Blackmore[2] utilizes a KeyDependency method that seems to work on new versions of Pinnacle (some testing on P16):

// Suppress AskYesNo Boxes
Store.FreeAt.CatchAllAskYesNo="";
Store.At.CatchAllAskYesNo=KeyDependency{
    KeyString = "Test.CatchAskYesNo";
    AddAction = "Test.CatchAskYesNo = 1";
    AddAction = "Test.ExpectedAskYesNoReply= 1";
    ExecuteActions = "";
};
Test.CatchAskYesNo = 1;

//Code goes here. 
//Every AskYesNo box will be answered with Yes. 
//For No, change ExpectedAskYesNoReply to 0 above. 

// Turn off KeyDependency.
Store.FreeAt.CatchAllAskYesNo = "";
Test.CatchAskYesNo = 0;
  • The following example does not seem to work in versions of Pinnacle newer than 9.0.
Test.ExpectAskYesNo=1;
Test.ExpectedAskYesNoReply=1;

Other pop-up message types

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License