Jobs in VirtualDub are stored as scripts in plain text format, with additional
control parameters stored as specially-formatted text strings. It is best
to let VirtualDub modify its job control file instead of modifying it directly,
but it may be useful to do this with a text editor or with an external program.
All control lines are comment lines with a token starting with a dollar sign
($), and optionally followed by arguments, with only one control op per line:
// $numjobs 3
This line tells VirtualDub that there are three jobs in this file. Since all
non-scripting commands are stored as comments, it is possible to execute the
job file as an ordinary script, although error control is different in job
control -- individual sections are executed as separate scripts and errors
are isolated between them, so that an error in one script does not prevent
others from executing.
Each additional job in the file is of the form:
// $job "Job 1" // $input "f:\mkrtest.avi" // $output "f:\test.avi" // $state 2 // $start_time 01c01df3 c2eb68c0 // $end_time 01c01df3 eb3d85b0 // $script <script commands> // $endjob
Notice that the job ($job), input filename ($input), and output filename
($output) arguments are strings but do not contain escapes. Also, the
input and output filenames are used for display purposes; they should match
the script but changing them will not change the files used.
$state controls the execution state of the job entry:
0 WAITING Job is ready to be executed. 1 INPROGRESS Job is currently being executed. If VirtualDub sees this tag when loading a jobs file, it assumes that the operation crashed, and the job is switched to the ABORTED state. 2 DONE Job is completed and does not need to be executed. 3 POSTPONED Job is ready to be executed but has been postponed by the user and thus should be skipped. 4 ABORTED Job was started but did not complete properly. VirtualDub won't reattempt this job unless it is switched to WAITING by the user. 5 ERR An error was enountered while executing this job. VirtualDub won't reattempt this job unless it is switched to WAITING by the user.
$start_time and $stop_time contain the starting and stopping times,
respectively, of the given job. The times are stored as two 32-bit hexa-
decimal values, with the first being the dwHighDateTime value of a Win32
FILETIME structure, and the second being dwLowDateTime. Zero for both
values indicates no time for that entry. It makes no sense to have
a stop time without a start time.
The actual Sylia script is bracketed by the $script and $endjob markers;
this means that the script must come last, after all job parameter
commands. Any command is actually valid in this script, including
multiple operations; this may be helpful if multiple operations need to
be sequenced, and subsequent operations can't be done if the initial
ones fail. Scripts run with whatever environment exists at the time of
invocation, so the script needs to set all parameters appropriately, and
can't assume configuration variables will be set in any particular manner.