Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When saving a file and making changes to it one can revert using File->Revert in the menu or by entering

FrontEndExecute[FrontEndToken["Revert"]]

before reverting a dialog window opens to ask if you are sure. I would like to skip this dialog by automatically answering with yes.

Is that possible?

Edit:

Here is a picture of the dialog.

enter image description here

share|improve this question
up vote 5 down vote accepted

Add False as a second argument to FrontEndToken for "Revert":

FrontEndExecute[FrontEndToken["Revert", False]]

share|improve this answer
    
Great, thanks a lot! – jens_bo Dec 12 '12 at 20:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.