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

Run script from a custom script

New Here ,
Oct 03, 2022 Oct 03, 2022

Copy link to clipboard

Copied

Hello guys, here my problem:

I would like to create a button on a dockable script to call a script in a specific location. Pratically a shortcut to a script...

here the code i'm using without success:

 

 

system.callSystem('cd "C:\Program Files\Adobe\Adobe After Effects 2022\Support Files"')

system.callSystem('afterfx -r  "\\isifcp\Storage_Dmpp\netapp\grafica\calcio\Magazine 2022\SERIE A\MAGAZINE MANAGER 2022_2023.jsx"')

 

 

Thanks in advance

TOPICS
Expressions , Scripting

Views

166

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

correct answers 2 Correct answers

LEGEND , Oct 03, 2022 Oct 03, 2022

Shouldn't matter which method you use, as ultimately you only call a file association and let Windows handle the rest, give or take potential permission issues.

 

Mylenium

Votes

Translate

Translate
Community Expert , Oct 04, 2022 Oct 04, 2022

Votes

Translate

Translate
LEGEND ,
Oct 03, 2022 Oct 03, 2022

Copy link to clipboard

Copied

This would probably be done better by simply calling a *.bat file or Power Shell Script. These convoluted paths and multiple nested quote marks tend to throw things of as you would need to isolate them both in the script and the command string.

 

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
New Here ,
Oct 03, 2022 Oct 03, 2022

Copy link to clipboard

Copied

Ok,

 

let's say i have the bat file ready in folder. Then how wuold u call the .bat file?

 

By Execute() o with a System call?

 

Thank you

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
LEGEND ,
Oct 03, 2022 Oct 03, 2022

Copy link to clipboard

Copied

Shouldn't matter which method you use, as ultimately you only call a file association and let Windows handle the rest, give or take potential permission issues.

 

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
New Here ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

hey @Mylenium 

 

your workaround works weel to me and i was able to reach my scope. However my first intent was to run the script without involving any other support file. What about the @Mathias Moehl suggestion? What code should i use to reach the .jsx location and evaluate his content?

 

Tnx for ur support

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 ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

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
New Here ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

LATEST

Thanks a lot @Mathias Moehl @Mylenium 

your help was really valuable to me and i've learned a lot of useful code and approaches.

 

see u soon

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 ,
Oct 03, 2022 Oct 03, 2022

Copy link to clipboard

Copied

Maybe it is easier to read the script file and eval its content?

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