Note: if you are looking for an update to the free version (with an updated cut-off on December 31, 2021), please send me an email – [email protected] and I’ll send you a download link.
I’ve been dabbling around with ExtendScript DLLs.
These little critters run within ExtendScript and allow me to enhance ExtendScript, for all apps that support it, including InDesign Server, on Mac and Windows.
I can add whatever functionality I decide to wrap into such a DLL.
Now, I’ve just finished wrapping the C++
libcurl into such a wrapper. A full version can be downloaded here (runs till December 31, 2020. A new binary will be provided around December 1):
There is nothing to install, no admin privileges needed. You just need to add a folder with a few .jsx files to your ExtendScript project, and you can simply write ExtendScript like:
#include "JSXGetURL/JSXGetURLLoader.jsx" var getURL = JSXGetURL(); var s = getURL.get("https://www.rorohiko.com"); alert(s.substr(0,1000));
and this works in InDesign Server, ExtendScript Toolkit, Bridge, InDesign, InCopy, Illustrator or whatever else supports ExtendScript, and it works both on Mac and Windows. And it’s very fast because it’s all compiled C/C++ code.
(Note: when running from ExtendScript Toolkit make sure that the Debug – Do Not Break On Guarded Exceptions menu item is ticked. The loader relies on try-catch to work when it figures out whether to load the 64-bit vs 32-bit dynamic library).
Right now, I’ve only done a synchronous
post and nothing event-driven. I can add many bells and whistles, as desired; I’ve done only a proof-of-concept.
As it is, this thing now kind of supersedes my old ventures (https://coppieters.nz/?p=133 which uses CEP/node as a ‘servant’ to ExtendScript, and does not work on InDesign Server, and https://rorohiko.blogspot.com/2013/01/geturlsjsx.html which was pure JSX, a subset of
http only, no
For commercial use, I am currently thinking of the following approach:
- Make this binary ExtendScript enhancement available free of charge.
- I’ll refresh/update the ‘free’ binaries every year around December.
- I am open to negotiating support contracts for anyone interested. These support contracts can be tailored to provide developer training, assistance with compiler setup, creation of custom versions, access to the source code and compiler IDE files…
The conundrum I was facing: what to do with this? Over the years, I’ve tried to ‘productize’ some of the software I wrote, but I’ve never managed to generate enough income from that to make it worthwhile. My main income is always from consultancy/custom dev/project kickstarts/teaching/temporary team booster.
As a potential ‘shrink-wrap’ product, this one is even more problematic. I think the market for this product is extremely limited (maybe 10-100?). And ExtendScript is on the way out, so the lifetime is limited. Productizing it (adding licensing/demo/docs/support/marketing…) would be a fair bit of effort. Coding is just a small part of the whole product creation.
But I think this could be extremely helpful for a bunch of InDesign Server projects (and maybe for some Illustrator and Bridge projects). Being able to ‘grab’ assets straight off a URL via a lightning fast C/C++ DLL is pretty powerful.
For example: how about protecting your intellectual property by dynamically loading part of your critical code from a remote server after a license check, instead of relying on JSXBIN?
The next thing I want to try is to embed a Chrome V8 engine inside ExtendScript – turn the world on its head. There is no business case for this – it’s just something I want to try and see how it works out.
Anyway: if you’re interested in this ExtendScript enhancement and have ideas or questions, contact me at [email protected]