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
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
You can simply do
$.evalFile(MY_FILE_HERE)
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
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
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
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
Copy link to clipboard
Copied
You can simply do
$.evalFile(MY_FILE_HERE)
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Maybe it is easier to read the script file and eval its content?