I know that the JXA scripts and some of the manually triggered object/stencil scripts can prompt for basic input beyond the message box demonstrated in the online automation docs, but what I’d really like the ability to do would be to prompt for key parameters that would drive behavior of some of the plugin’s actions directly from the plugin code itself.
Some of this I know I can get around via using listeners for events on properties, but I was wondering why there wasn’t any kind of direct interaction beyond the yes/no/cancel message box included in the API.
I’d really prefer not to have a bifurcated application that drives some behavior from externally and some from within the context of a given drawing simply because of limitations in the scripting API. It’s much harder to maintain and the UX is potentially dreadful depending on what kinds of things need to be done.
It seems that Omni added a “Form” Object to OmniJS, which allows user input. I hadn’t time to play with it yet, so I can’t say much about it.
Form
Form provides a mechanism to collect input from the user. Each form contains one or more instances of subclasses of Field , which are given a key. As the form is filled out, values object is populated with the values from the user interface.