Highlighted

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

Contributor ,
Nov 15, 2020

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?

TOPICS
How to, Scripting, User interface or workspaces

Views

157

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

Contributor ,
Nov 15, 2020

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?

TOPICS
How to, Scripting, User interface or workspaces

Views

158

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 15, 2020 0
Most Valuable Participant ,
Nov 15, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2020 0
Adobe Community Professional ,
Nov 17, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0
Contributor ,
Nov 17, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0
Adobe Community Professional ,
Nov 17, 2020

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);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 1
Contributor ,
Nov 18, 2020

Copy link to clipboard

Copied

It only support http:// link right? But my json file is in git repo.Which give us https:// Link

 

AE.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 18, 2020 0
Adobe Community Professional ,
Nov 18, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 18, 2020 1
Contributor ,
Nov 18, 2020

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 18, 2020 0