Is there any way I can programatically determine whether a notebook has unsaved edits?
Is that asterisk on the right of the notebook name represented in a notebook option or something, like HasUnsavedEdits
?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityIs there any way I can programatically determine whether a notebook has unsaved edits?
Is that asterisk on the right of the notebook name represented in a notebook option or something, like HasUnsavedEdits
?
I think that
"ModifiedInMemory" /. NotebookInformation@SelectedNotebook[]
does what you want (ie, returns False
if the notebook is saved, True
if it is not saved). Although maybe not quite, try NotebookInformation[CreateDocument["hi"]]
But it seems to work once you modify a notebook that's been saved once. I could be wrong though...