• 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: David Gregg <email@hidden>
  • Date: Wed, 22 Oct 2014 12:22:30 -0600

Hi Jeremy,

I am currently working with a non-scriptable app that is Cocoa based. Currently I am using System Events scripting and can get and set most objects. Often you can tack together an alternative method if you can’t directly get or set the object. 

This method, as far as I know, doesn’t give you the ability to determine whether the window is dirty or not directly but depending on the app you might be able to determine that through accessing the title bar, some change the icon or the title when the file is edited.

If you download UI Browser (http://pfiddlesoft.com/uibrowser/index.html) then you can use the trial mode to see whether you can get or set the objects of interest in 4D, through System Events, without spending any funds.

Controlling the timing is also a frequent problem with GUI scripting as the script frequently outperforms the refresh rate of the GUI. This is a common problem not only with the System Events suite but also with macro programs like QuicKeys, Keyboard Maestro, etc. The lazy way is just to use delay statements the better way is to use repeat loops that look for the arrival or disappearance of GUI objects.

Regards
David Gregg
 
On Oct 22, 2014, at 11:51 AM, Jeremy Roussak <email@hidden> wrote:

Entering data into a field, or editing the field, in an entry form. It's a shame that 4D doesn't do this itself, but there it is. There was a plugin, but it was for Carbon and it's stopped working. I'd like to rewrite it and AS seemed a good place to start, before I redo it in Objective C or Swift.

Jeremy


Jeremy Roussak
email@hidden

On 22 Oct 2014, at 17:55, Alex Zavatone <email@hidden> wrote:



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.
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
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>)
 >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: Scripting iCloud Drive on Yosemite
  • Previous by thread: Re: Front window dirty
  • Next by thread: Re: Front window dirty
  • Index(es):
    • Date
    • Thread