Copy link to clipboard
Copied
Dear All,
My request is fetch or alert data from URL using ExtendScript (InDesign).
Could any one please help for this.
Dig into google and find the below code, it looks good.
But my bad time, this one is not working for longer URL.
https://gist.github.com/daluu/2d9dec72d0863f9ff5a7
Not working for:
2 Correct answers
If you're missing the JSInterface plugin, did you install the plugin using a package installer? If using ID 2020, use this link instead: https://coppieters.nz/?p=310
Kris provides instructions on the older blog post about installing the plugin.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi Mannan,
Thank you for your swift reply...
I tried to run the script from the provided link, but I found the below error.
Error is JSinterface is undefined,
Hope "JSInterface.plugPlugLibraryPath" is missing
Copy link to clipboard
Copied
HI Manan,
I tried the GetURL.jsx, but it makes error. Please help on this!!
Copy link to clipboard
Copied
If you're missing the JSInterface plugin, did you install the plugin using a package installer? If using ID 2020, use this link instead: https://coppieters.nz/?p=310
Kris provides instructions on the older blog post about installing the plugin.
Copy link to clipboard
Copied
Thank you for your great support.. Manan and brian311.
Now this is working fine...
Still need to test in various sitations and different conditions..
Copy link to clipboard
Copied
Hi all,
I now have a much better solution, which is an ExtendScript enhancement. Very easy to use (simply #include a jsx file which automatically selects and loads a binary DLL or dylib).
It works with all applications that have ExtendScript (so it also works with Illustrator, InDesign Server, ESTK, Bridge...).
It's based on libcurl. More info here:
https://coppieters.nz/?p=375
My previous 'GetURL' was using node.js/CEP which is not supported with InDesign Server. This new approach does not rely on CEP, so it works with InDesign Server.
Example:
#include "JSXGetURL/JSXGetURLLoader.jsx"
var getURL = JSXGetURL();
var s = getURL.get("https://www.rorohiko.com");
alert(s.substr(0,1000));
Copy link to clipboard
Copied
Another approach could be https://github.com/grefel/restix
- HTTPS supported
- Works form CS4 to CC 2018 (ExtendScript based library)
- Based on VBScript/ServerXMLHTTP (Win) AppleScript/curl (Mac) relies on app.doScript()