UI Scripting summary (was Re: Scripting NoteBook, continued)
UI Scripting summary (was Re: Scripting NoteBook, continued)
- Subject: UI Scripting summary (was Re: Scripting NoteBook, continued)
- From: Jean-Christophe Helary <email@hidden>
- Date: Tue, 12 Jan 2016 09:46:55 +0900
2016/01/12 9:32、Rob Lewis <email@hidden> のメール:
>
> Next question:
>
> NoteBook has an Export command, but it’s not accessible to AppleScript. I guess UI scripting is the only hope, but I’m fairly clueless about it. It would involve clicking radio buttons, checking boxes, selecting a file format from a pop-up menu, and setting the export file name and path.
>
> Any kind soul willing to walk me through it, or point me to a good source of info?
We're just having a discussion on UI scripting. I've actually tried it on a Java application that's not scriptable at all and it is much easier than I thought.
First, you need to follow a simple tutorial, like this one:
http://www.macosxautomation.com/applescript/uiscripting/
Basically, you give GUI scripting access to the accessibility features in OSX.
Once you've done that, you should be able to code some trivial things.
Then, you need to explore how the application is made, for that there are 3 solutions:
1) try to figure it out yourself starting from the root element (I did, it's interesting but it's a pain)
2) use UIElementInspector, it is a free utility provided by Apple:
https://developer.apple.com/library/mac/samplecode/UIElementInspector/Introduction/Intro.html
You get the code *and* the binary. It shows you how the UI elements are put together, you need to write the code from that.
3) use UI Browser, free trial for 30 days, provided by Bill Cheeseman:
http://pfiddlesoft.com/uibrowser/index.html
As far as I can tell, the main difference is between the 2 is that UI Browser makes AS code for you to access the widget you need.
Jean-Christophe
_______________________________________________
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