integrating AppleScript and ScriptUI in Adobe Illustrator/InDesign?
integrating AppleScript and ScriptUI in Adobe Illustrator/InDesign?
- Subject: integrating AppleScript and ScriptUI in Adobe Illustrator/InDesign?
- From: has <email@hidden>
- Date: Fri, 13 Mar 2015 14:24:18 +0000
Hi all,
I'm currently looking at options for generating and displaying GUI
dialog/panel based input forms as a frontend to Illustrator/InDesign
scripts. i.e. User runs script, script displays a form on top of AI/ID
where user types in whatever values script needs to do its job, then
blocks until user clicks OK, at which point the dialog returns the data
to the script which proceeds to do its thing. A bit like the old Dialog
Director osax, if you remember that.
At the moment I'm using a scriptable UIAgent (aka Faceless Background
Application) to pop up a floating NSPanel containing a WebView and
displaying a JSON-driven dynamic HTML form [1] in that. It's a bit
unrefined, and I've yet to figure out if it's possible to prevent the
panel stealing focus from AI/ID every time the user clicks in it (which
causes all of AI/ID's own panels to appear and disappear as users switch
between them).
So I'm wondering if anyone here has experience in doing similar things
via, say, Adobe's own embedded JavaScript-based ScriptUI system, which
allows native Illustrator/InDesign UI panels to be generated and
displayed within the app itself. Things I'm not sure on are how
easy/hard it is to generate those panel structures dynamically (it
appears to use JS code rather than JSON data structures), and how
easy/hard it is to get the user's input values back to my own script
from JSX as ScriptUI appears to be asynchronous, returning as soon as
the form is displayed rather than when it is submitted. (JSX isn't
exactly famed for its inter-process messaging abilities.:p)
Or, if anyone's got any other suggestions, please fire away. Note that
I'm already aware of self-contained .app wrappers like Pashua, but
that's not what I'm looking for. I need something lightweight, dynamic,
and non-intrusive that doesn't interfere with users' established working
habits.
Thanks,
has
[1] https://github.com/joshfire/jsonform
_______________________________________________
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