Photoshop 'Dirty' flag / Saved State

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

rmawatson

Photoshop 'Dirty' flag / Saved State

Post by rmawatson »

Does anyone know if the scripting api (or c api) has a way to get the saved state of a document, or if it has changed since the last time it was saved, I know this information exists as photoshop will prompt you to save if you do anything to your document and close it. My only idea is to bind to every event I might be interested in, and set my own dirty flag when any of these events is executed. However there doesn't seem to be an event for painting on a document.

Any ideas?

thanks

rob.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

Photoshop 'Dirty' flag / Saved State

Post by Mike Hale »

The Document property saved will tell you if the document has been changed since it was last saved.

Code: Select allvar isSaved = app.activeDocument.saved;// true if no changes since open/last save