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

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

Contributor ,
Nov 15, 2020 Nov 15, 2020

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
896
Translate
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

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

Translate
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

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

Translate
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

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

Translate
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

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

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

 

AE.pngexpand image

Translate
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

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

Translate
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
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.

Translate
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