0

I'm trying to run a Adobe Script in Premiere using Windows Batch.

Is this possible at all?

kanjas
  • 73
  • 1
  • 8

1 Answers1

0

I found nothing about this, so I hacked my own solution.

You need to use Windows Batch to:

-Run Premiere

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

Then I followed this: Press Keyboard keys using a batch file

Here I added

TIMEOUT /T 7

To wait for Premiere to open,

then

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" 

next I used the shortcut Ctrl shift A to define a target engine, press premi, then F5. I give it some time, then I stop debugging. All done through 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));
General Grievance
  • 4,555
  • 31
  • 31
  • 45
kanjas
  • 73
  • 1
  • 8