Is it possible to auto update InDesign script from cloud?
Copy link to clipboard
Copied
Hi All,
Is it possible to update a script from the cloud once there is a difference in the size of the script?
Thanks,
Shonky
Copy link to clipboard
Copied
Nothing inbuilt that you can use out of the box. You will need to create the workflow yourself should not be a complex job. You could write something using Python or even use Extendscript(would be a bit difficult to make web calls using this)
-Manan
Copy link to clipboard
Copied
Thanks Manan for your reply. Do you have any examples? I never worked on Python.
Thanks,
Baljeet
Copy link to clipboard
Copied
I don't have any examples to share at the moment. But Python is pretty heavily used you can find lots of examples via google search. You could use something else like Applescript(MAC), VBScript(WIN), NodeJS(platform agnostic). The idea is that you will have to implement it by putting the pieces together in whichever programming language you are comfortable with.
-Manan
Copy link to clipboard
Copied
How we can execute Python/NodeJS code from InDesign JavaScript?
Copy link to clipboard
Copied
You don't need to execute it from within InDesign. Create a separate application using say Python/NodeJs that will query your server for the current server version of the script file, then compare it with the current local version, if the update is required the Python/NodeJs application will download the new version of the script and replace the older version.
-Manan
Copy link to clipboard
Copied
Agree that can be done but I am looking solution using InDesign only if possible.
Copy link to clipboard
Copied
Extendscript is not equipped to make web calls so you might face issues on that front. Extendscript comes with just a socket object so to make webcalls you will have to implement the http/https protocol yourself. One such solution that Kris has developed can be tried via the following link
The other approach could be to investigate CEP extensions. Or maybe checking if you could leverage Applescript/VBScript to do this
-Manan
Copy link to clipboard
Copied
Already tried Kris's solution but it's not helping. Let's see if someone else can give you any other ideas.
Thansk for looking into it.
Copy link to clipboard
Copied
There is no other way then, you will have to get your hands dirty with fixing what is not working. As mentioned ES does not have that capability so either you extend it or use some other tool.
P.S.:- Can you let me know what specifically does not work in Kris's solution. I have not used his implementation but had created something almost similar sometime back and I was able to make webcalls and download stuff from S3 buckets as well. So, in my opinion, it should work for you.
-Manan
Copy link to clipboard
Copied
Did you investigate using CEP to do the job. CEP extensions can make webcalls like an HTML/JS app and can also communicate with JSX back and forth so it should be also worth a try. If you are not averse to using CEP that should be the next thing to look into.
-Manan
Copy link to clipboard
Copied
I am getting attached error when trying to run getURL script downloaded from Kris's site.
Copy link to clipboard
Copied
I don't have a WIN machine to verify this. Contact Kris for help on that. Anyways, if you plan to use his solution for commercial purposes you will have to write to him.
-Manan
Copy link to clipboard
Copied
I am using it on a Mac machine. Do you mean it will work on Mac only? I need to use it in-house only.
Copy link to clipboard
Copied
Sorry I mistook your screenshot for a WIN one. It should work on MAC as well, the zip package contains the framework files for MAC in addition to the DLL files for WIN
-Manan
Copy link to clipboard
Copied
Is it working on your end? I just got the below three files in geturl folder.
geturl
- GetURLs.jsx
- podcast.txt
- GetURLSample.indd
Copy link to clipboard
Copied
You seem to be using the older version that was implemented using JSX only. Did you even look at the link that I supplied? Use the following link to download the latest version that uses C++ for the implementation and has DLL's/Framework files for ESTK
https://www.rorohiko.com/downloads/JSXGetURL.0.0.5.zip
-Manan
Copy link to clipboard
Copied
Thanks but still getting an attached error with this script. I am using BigSur OS on Mac.
Copy link to clipboard
Copied
Works fine for me on my MAC. For Big Sur did you run the dequarantineMac.command to dequarantine the frameworks?
-Manan
Copy link to clipboard
Copied
Same error after running dequarantineMac.command.
Copy link to clipboard
Copied
I don't have a Big Sur MAC to test. Better contact Kris with details on what issue you are facing.
-Manan
Copy link to clipboard
Copied
Thanks!
Copy link to clipboard
Copied
Another thought: make sure to NOT separate sample.jsx from the JSXGetURL folder. They need to stay together. Merely dragging sample.jsx into your scripts folder will not work - it needs the JSXGetURL folder in the same spot.
Copy link to clipboard
Copied
Thanks Kris! sample file is within the JSXGetURL folder, see attached result and screenshot.
Copy link to clipboard
Copied
Is this on an M1 Mac or a regular Intel Mac? Please provide ample details (e.g. exact version of Mac OS X, exact version of InDesign, M1 or Intel Mac,...).
What URL are you accessing in the sample.jsx script? Have you verified that URL is accessible from your location?
For the sake of argument, the sample.jsx refers to https://www.rorohiko.com but if that URL is not accessible from your computer (e.g. because of firewalls), you'd get 'undefined' in the variable s. The sample.jsx is very rudimentary and has no error checking whatsoever.
-
- 1
- 2