Is it possible to update a script from the cloud once there is a difference in the size of the script?
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)
Thanks Manan for your reply. Do you have any examples? I never worked on Python.
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.
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.
Agree that can be done but I am looking solution using InDesign only if possible.
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
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.
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.
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.
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.
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.
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
Is it working on your end? I just got the below three files in geturl folder.
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
Works fine for me on my MAC. For Big Sur did you run the dequarantineMac.command to dequarantine the frameworks?
Same error after running dequarantineMac.command.
I don't have a Big Sur MAC to test. Better contact Kris with details on what issue you are facing.
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.
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.