Endless Paradigm

Full Version: I hate DOS Batch scripts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Spent over 30 minutes trying to create such a simple script.

Was so close to jumping into visual studio... could have made the same script with a GUI in half the time...

Had to convert a 359 page book from SFW that I ripped from the net to image files.

Code:
@ECHO OFF
Echo Setting variables...
set counterpage=18
set counter=1
Echo Coverting... Please wait...
:loop
swfrender page_00%counterpage%_L1-%counter%.swf -o Output\page_00%counterpage%_L1-%counter%.png
Echo Done Page %counter%.
set /a counterpage+=1
set /a counter+=1
if %counterpage%==100 GOTO PHASE2
goto loop

:PHASE2
ECHO ------------------------
ECHO Switched to 100.
ECHO
:phaseloop
swfrender page_0%counterpage%_L1-%counter%.swf -o Output\page_0%counterpage%_L1-%counter%.png
Echo Done Page %counter%.
set /a counterpage+=1
set /a counter+=1
if %counterpage%==360 GOTO PWD_END
goto phaseloop

:PWD_END
Echo "Done"
pause

Does it work? I see where the problem is.
Yeah I hate it too.

I wrote some drag and drop PSP encoding script some long time ago completely in that.  500 lines of fucking DOS code, because I didn't know any better back then.

Oh yeah, it does automatic aspect ratio aware resizing, auto font and subtitle extraction and hardsubbing, x264 profiles, and VFR aware encoding and some other shit, which is why it took so many lines.
dark_mirage Wrote: [ -> ]Does it work? I see where the problem is.

Yea, it works.
Oh, my mistake then.
*An embarrassed dark_mirage walks away...
Bash > Batch
trademark91 Wrote: [ -> ]Bash > Batch
Le Jooms Wrote: [ -> ]
trademark91 Wrote: [ -> ]Bash > Batch

Yes. But for my purposes, Windows > Linux.
Le Jooms Wrote: [ -> ]
trademark91 Wrote: [ -> ]Bash > Batch
[Image: trufax.png]
^ TRU » TRAY


Eh, a lot of it is familiarity.  Being unfamiliar with something means it takes you longer to get it right.
Pages: 1 2
Reference URL's