Skip to main content
Adirai Maji
Inspiring
November 15, 2020
Question

[Scripting] How to hide Windows Cmd prompt when using system.callSystem() ....????

  • November 15, 2020
  • 2 replies
  • 1176 views

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?

This topic has been closed for replies.

2 replies

Justin Taylor-Hyper Brew
Community Expert
Community Expert
November 17, 2020

What are you trying to do via command prompt / system.callSystem() ?

Adirai Maji
Inspiring
November 18, 2020

I'm trying to download a text file with curl cmd.

Justin Taylor-Hyper Brew
Community Expert
Community Expert
November 18, 2020

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);
Mylenium
Legend
November 15, 2020

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