运行 使用 Windows 批处理的 .jsx 文件

Run a .jsx file using Windows Batch

我正在尝试使用 Windows 批处理 运行 Premiere 中的 Adob​​e 脚本。

这可能吗?

我对此一无所知,所以我破解了自己的解决方案。

您需要使用 Windows 批处理来:

-运行首映

@echo off
Start "" "enter path for premiere.exe here" 

然后我跟着这个教程:

https://syntaxfix.com/question/16342/press-keyboard-keys-using-a-batch-file

这里我加了

TIMEOUT /T 7

等待 Premiere 打开,

然后

rem Use %SendKeys% to send keys to the keyboard buffer
set SendKeys=CScript //nologo //E:JScript "%~F0"




rem Start the other program in the same Window
start "" "link for Visual Studio Code" "folder path you want to open" "file path you want to open" 

接下来我使用快捷键 Ctrl shift A 定义目标引擎,按 premi,然后按 F5。我给它一些时间,然后停止调试。全部通过 bash

完成
TIMEOUT /T 2

set /P "=Wait and send a command: " < NUL
ping -n 5 -w 1 127.0.0.1 > NUL
%SendKeys% "^+{A}"



set /P "=Wait and send a command: " < NUL
ping -n 5 -w 1 127.0.0.1 > NUL
%SendKeys% "premi~"



set /P "=Wait and send a command: " < NUL
ping -n 5 -w 1 127.0.0.1 > NUL
%SendKeys% "{F5}"

TIMEOUT /T 5

set /P "=Wait and send a command: " < NUL
ping -n 5 -w 1 127.0.0.1 > NUL
%SendKeys% "+{F5}"

goto :EOF


@end


// JScript section

var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));