Stopping a Script under given conditions??



I am using the signature block with a Yes and No question message in the "PreSign" as follow:

var nButton = app.alert({ 

cMsg: "Warning: This step finalizes your report. You will no longer be able to edit it. \n\nDo you want to continue?", 


nIcon: 1, nType: 2 


if(nButton == 4)

{// A yes Response

  // Code for doing the thing you do on a yes

  console.println("The Response Was Yes");


else if(nButton == 3)

{ // No Response

   console.println("The Response Was somthing other than Yes: " + nRtn);


I was hoping to get the script to stop going to the signature block (or any further) if the user chooses "No"??

If you are wondering , I am planning to turn the report "ReadOnly" in the "Click" event. Not using the lock option of the Signature block because it makes the file too big for my purposes (ie: almost double the size of the file)

Any help would be much appreciated.

Accepted Solutions (0)

Answers (0)