• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Contributor ,
Nov 15, 2020 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

763

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
community guidelines
LEGEND ,
Nov 15, 2020 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

Votes

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
community guidelines
Community Expert ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Contributor ,
Nov 17, 2020 Nov 17, 2020

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Expert ,
Nov 17, 2020 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);

Votes

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
community guidelines
Contributor ,
Nov 18, 2020 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

Votes

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
community guidelines
Community Expert ,
Nov 18, 2020 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

Votes

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
community guidelines
Contributor ,
Nov 18, 2020 Nov 18, 2020

Copy link to clipboard

Copied

LATEST

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.

Votes

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
community guidelines