basiljs/basil.js

How can I execute a basiljs script directly from terminal?

gsomeone opened this issue · 6 comments

I'm trying to create a jsx file that gets executed when something else happens in another program. I am confident I can do that if I find the way to launch the jsx file from the terminal.

Has anybody already did this? Is there any documentation?

Background:
I am creating a tool to show shapes to a webcam to rapidly prototype designs in a tangible way.

Take a look at this stackoverflow answer https://stackoverflow.com/a/37323769/1770432
You might need to bundle all the scripts.

There is currently a bug related to ESTK which might make this harder https://medium.com/adobetech/extendscript-toolkit-debugger-error-1116-67cce4d47af7

ffd8 commented

A student had success by first having the script accessible within the scripts user panel – then you can make custom shortcuts to launch a script. From there – you can use applescript or we used Processing + robot library to control the computer and press that command key.

thanks for your replies.
just to be sure, it's not longer possible to use websocket with basil.js on indd cc 2018?

Should still be possible but I don't have any examples floating around

trych commented

There is an example here (for the currently still official basil 1.x) and one here (for the yet unreleased but much improved basil 2.0).

I can't test it right now and I also don't have InDesign CC, but you could give it a try.