Copy link to clipboard
Copied
Hi,When I try to use system.callSystem to use my cmd prompt in windows, It popsup the black cmd prompt. I don't want to see it. Any possible way to avoid it?
Copy link to clipboard
Copied
That's entirely up to the parameters of invoking the command line/ Windows Scripting Host/ Power Shell itself and has nothing to do with AE. Check the Windows docs. The best option is likely to create a specific batch file or link and execute this instead of directly addressing the receiver app.
Mylenium
Copy link to clipboard
Copied
What are you trying to do via command prompt / system.callSystem() ?
Copy link to clipboard
Copied
I'm trying to download a text file with curl cmd.
Copy link to clipboard
Copied
I'd try an HTTP request instead, curl isn't availbile on all Windows installs. An HTTP request works cross-platform. Here's a library that makes it pretty easy:
https://github.com/buraktamturk/adobe-javascript-http-client
You can use it like:
var data = $http({
method: 'GET',
url: 'http://example.com/path/to/test.json',
headers: {'Accept': 'application/json','Content-Type': 'application/json'}
});
alert(data.payload);
Copy link to clipboard
Copied
It only support http:// link right? But my json file is in git repo.Which give us https:// Link
Copy link to clipboard
Copied
Darn, yea looks like it has that limitation. You can achieve this with the Socket() object, but last I tried I wasn't able to figure it out as there's next to zero documentation on this. Here's a few examples to get you started:
https://extendscript.docsforadobe.dev/external-communication/socket-object.html
Copy link to clipboard
Copied
I've searched a lot about this socket object. I didn't understand anything on it. That's the reason I used callSystem(). It worked fine. But the cmd prompt popup make the process look weird. Anyway. Thank you so much for your effort to answer my questions. I'll take a look that again into it.