FYI, I forgot to mention that the "modified" property of a document is a read only property. Once you have the front doc, you can easily check if it is modified, but I am not aware of any AppleScript method to set the document to modified, or set the file's dirty bit.
I'd check to see if there is a shell script approach to set a file's dirty bit to true, then get the document's file path and use AppleScript to call the shell command to set the file's dirty bit.
Good luck! Sent from my iPad. Please pardon typos.
On Oct 22, 2014, at 10:49 AM, Alex Zavatone < email@hidden> wrote: From what I remember using AS in Photoshop and Illustrator, you can get every "document". You can also get the "current" document and that is the front most.
FYI, if you have the Script Debugger app, it is really easy to open a dictionary for the current app, search it and get info about the commands you need.
Hope this helps, Alex
Sent from my iPad. Please pardon typos.
On Oct 22, 2014, at 10:36 AM, Jeremy Roussak < email@hidden> wrote: Is there a straightforward way in AS to obtain a pointer to a non-scriptable application's frontmost window and to set its "dirty" flag (so the dot appears in the close button)? I suspect this might be one for Shane but I'll happily accept help from anyone!
Jeremy
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
|