3.6.3.1. Using Command Line Parameters on VBScript
(v61 onwards)
ChronoScan allows users to access command line parameters from the VBScript. This allows the user to use command line to perform custom tasks.
Use this function on the main object ChronoApp to access the command line:
cmdline_GetValue
cmdline_HasKey
cmdline_HasVal
More on the ChronoApp here.
Examples:
Executing Import in a Custom Directory:
ChronoScan.exe -vbs:"myscript.vbs" -workdir:"c:\myworkdir"
myscript.vbs:
WorkDir = ChronoApp.cmdline_GetValue("workdir")
...
Batch.ExecuteInputModule "pdf_files", "PDF document Import#directory="&workdir
...
Checking if a Key Exists:
ChronoScan.exe -vbs:"myscript.vbs" -workdir:"c:\myworkdir" -scansubdirs
...
WorkDir = ChronoApp.cmdline_GetValue("workdir")
If ChronoApp.cmdline_HasKey("scansubdirs") Then
' Activate debug mode
Batch.ExecuteInputModule "pdf_files", "PDF document Import#directory="&workdir&"debug=1"
Else
Batch.ExecuteInputModule "pdf_files", "PDF document Import#directory="&workdir
End If
...