• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Front window dirty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Front window dirty


  • Subject: Re: Front window dirty
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 22 Oct 2014 12:55:46 -0400



Sent from my iPad. Please pardon typos.

On Oct 22, 2014, at 11:09 AM, Jeremy Roussak <email@hidden> wrote:

Thanks for the thoughts, but:

I can't read the application's dictionary: it's not scriptable and doesn't have one.

I believe NSWindow has a setDocumentEdited method which may do what I want, but I don't know how to get at it.

There's no file on disk. It's not a document window: it's part of a database (4th Dimension). 4D itself doesn't have a way to set the dot.

Jeremy


Then, what action(s) would cause the dot to be set?


Jeremy Roussak
email@hidden

On 22 Oct 2014, at 16:01, Alex Zavatone <email@hidden> wrote:

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


Jeremy Roussak
email@hidden
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
  • Follow-Ups:
    • Re: Front window dirty
      • From: Jeremy Roussak <email@hidden>
References: 
 >Front window dirty (From: Jeremy Roussak <email@hidden>)
 >Re: Front window dirty (From: Alex Zavatone <email@hidden>)
 >Re: Front window dirty (From: Alex Zavatone <email@hidden>)
 >Re: Front window dirty (From: Jeremy Roussak <email@hidden>)

  • Prev by Date: Re: Front window dirty
  • Next by Date: Re: Front window dirty
  • Previous by thread: Re: Front window dirty
  • Next by thread: Re: Front window dirty
  • Index(es):
    • Date
    • Thread