Copy link to clipboard
Copied
Dear Team,
Hi Team
I am currently seeking assistance in obtaining server-related information.
Is there a method available to retrieve the running PORT number during the execution of an InDesign Script file?
In my specific scenario, the Load Balancer dynamically determines the port number at runtime, which could be 12345, 12346, or 12347. Consequently, I am eager to ascertain the specific port number on which our script file is currently executing.
Your support in this matter is greatly appreciated.
Thank you in advance.
Copy link to clipboard
Copied
I don't think that a script can directly get a port number as it only automates tasks in InDesign application.
I don't know of any workarounds specifically but a few thoughts come to mind.
Maybe you need a server-side component that determines the port number and that can relay info back to the script somehow, maybe with sockets or HTTP requests.
Might be a web service that runs on the server the script querys it and retrieves the port number, maybe that would work dynamically.
Maybe the load balancer sets an environment variable with the port number, maybe a script could access this.
I'm only guessing from my very limited experience.
Copy link to clipboard
Copied
Hi @Bhaskar33442702dimp you can use the system object in ExtendScript like
var runningPort = system.callSystem('netstat -an | find "LISTEN" | find ":12345"');
Find more inspiration, events, and resources on the new Adobe Community
Explore Now