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
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.
|