Answer the question
In order to leave comments, you need to log in
How to write a bat file (need a little logic)?
Good afternoon!
You need to write a bat file that changes the screen resolution on startup, launches a console program
And after closing the program, it returns the screen resolution back
What we have:
"C:\Program Files (x86)\MultiRes\MultiRes.exe" /1:1280,720,32
start ffmpeg.exe -f dshow -i video="screen-capture-recorder" -vb 5000k %DATE%-%time:~0.2%.%time:~3.2%.avi
"C:\Program Files (x86)\MultiRes\MultiRes.exe" /restore
you need the last line ("C:\Program Files (x86)\MultiRes\MultiRes.exe" /restore) to work only after closing the console with ffmpeg (second line)
as do it?
Answer the question
In order to leave comments, you need to log in
It's easier for you then not to close the ffmpeg console, but to write a separate batch file for this.
start_ffmpeg.bat:
"C:\Program Files (x86)\MultiRes\MultiRes.exe" /1:1280,720,32
ffmpeg.exe -f dshow -i video="screen-capture-recorder" -vb 5000k %DATE%-%time:~0,2%.%time:~3,2%.avi
TASKKILL FFMPEG
"C:\Program Files (x86)\MultiRes\MultiRes.exe" /restore
I found someone else's solution and adapted it for myself
"C:\Program Files (x86)\MultiRes\MultiRes.exe" /1:1280,720,32
@ECHO OFF
TASKKILL FFMPEG
START "" C:\Users\nallion\Desktop\Record\ffmpeg.exe -f dshow - i video="screen-capture-recorder" -vb 5000k C:\Users\nallion\Desktop\Record\%DATE%-%time:~0.2%.%time:~3.2%.avi
:LOOP
tasklist | find /i "FFMPEG" >nul 2>&1
IF ERRORLEVEL 1 (
GOTO CONTINUE
) ELSE (
Timeout /T 5 /Nobreak
GOTO LOOP
)
:CONTINUE
"C:\Program Files (x86)\MultiRes\MultiRes.exe" /restore
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question