Qt CHDMAN GUI

From BATCOM-IT Services Wiki
Jump to: navigation, search

Contents

Qt based graphical user-interface for chdman, MAME's Compressed Hunks of Data manager

Introduction

Qt CHDMAN GUI - or qchdman in short - is an approach to creating a graphical user interface for chdman, MAME's Compressed Hunks of Data manager which is implemented as a tool used purely from command line. In a way qchdman is just a front-end, making it easier for not-so-technically-inclined users to even work with chdman. However, at the same time it adds platform-independent scripting capabilities and ease-of-use features which should make it an interesting add-on for everyone.

Configuration

The configuration of qchdman is stored in the file qchdman.ini which by default will be saved inside QMC2's (default) configuration folder, mainly because Qt CHDMAN GUI is part of the QMC2 project and usually distributed together with it, although it's designed to be a stand-alone application. If you want or need to change the configuration path you have to specify this on the command line, using the one and only (optional) argument -config_path. For example:

rene@thunder:~> qchdman -config_path ~/tmp/qchdman-config

Every other aspect of qchdman's configuration will be done in the GUI, either implicitly (i. e. window-position/-size or MDI sub-window modes), or explicitly through the preferences dialog.

For Linux/UNIX and Mac OS X, see also the qchdman man-page.

Initial set up

When qchdman is started for the first time - or when the configuration path (-config_path) was set to a folder not containing a valid qchdman.ini file - the GUI will ask you for the path to the chdman binary (i. e. chdman.exe in case of Windows) by popping up the preferences dialog, pointing you to the input of chdman's binary path that it requires (see Warning icon):

Initial set up (chdman binary selection)

It will also do this in any future runs, whenever it finds that the stored path to the chdman binary is empty, no longer exists or isn't accessible otherwise (i.e. isn't executable).

Preferences

The preferences dialog is reachable from the menu (File -> Preferences) or by pressing the Ctrl+P short-cut:

GUI settings

Path settings

GUI settings

  • Language: Language used by the application (uses the current desktop's language as default setting if available, you'll have to restart qchdman for a language change to take effect because translations are loaded at program start only)
  • Style: Style in which the GUI is presented (uses the current desktop's style as default setting if available)
  • Font: General font used by the application's widgets (will use the current desktop's standard font setting as default value if available)
  • Log font: Font used for logging messages (it's strongly recommended to use a mono-spaced font here for better readability)
  • Editor font: Font used by the script editor (it's strongly recommended to use a mono-spaced font here for better readability)
  • Display project help texts: Show help texts about each project-type's specific use (chdman command line options) or hide them
  • Maximize windows: Should new project- or script-windows be shown maximized or not (this only applies to the windowed view-mode)
  • Use native file dialogs: Use system-native common file open/save dialogs, if available, or Qt's built-in ones (the latter is recommended)
  • Log channel names: Include the names of process output channels (stdout or stderr) when logging messages spit by chdman (recommended) or treat them as one channel

Path settings

  • CHDMAN binary: Path to the chdman binary (i. e. c:/mame/chdman.exe on Windows) - this is a required setting
  • CHD input: Preferred folder for CHD input files (uses the current working directory if empty)
  • Non-CHD input: Preferred folder for non-CHD input files (uses the current working directory if empty)
  • CHD output: Preferred folder for CHD output files (uses the current working directory if empty)
  • Non-CHD output: Preferred folder for non-CHD output files (uses the current working directory if empty)

Project types

The term project is the GUI's representation of a single chdman function, and the type of a project stands for the actual chdman sub-command (info, verify, copy, ...).

After creating a new project (File -> New project / Ctrl+N), select its type from the drop-down list (top-left corner) and the widget will update its parameter list accordingly:

Project type selection

Enter the required and/or optional parameters (the so called project properties) and click the run-button (Run icon) to start chdman. To terminate a running chdman process prematurely, click the stop-button (Stop icon). And last but not least, there's a menu attached to the tools-button (Toolbox icon) of every project which contains items to access additional project-centric features.

The upper part of a project widget contains its parameter list, the lower part holds the project-log. All output from the chdman process (to the stdout and stderr output channels) that's running in the background will be routed to the log together with additional process management information by qchdman itself (such as process start-, finish- or error-messages).

Whenever the output from a chdman process can be used to determine its progress, qchdman will update the project widget's progress-bar accordingly (not all chdman sub-commands provide such information, but the few commands that don't all finish quickly enough so that it doesn't actually matter). The progress-bar's text will also indicate the current status of the project (Idle / Running).

Details about each individual project type can be found in the following sections.

Info - display information about a CHD input file Info project icon

The Info project type is used to retrieve detailed information about a CHD input file.

Info project screen shot

Info project properties

Property name

Type

Required?

Corresponding chdman info option

Description

InfoInputFile string yes --input / -i <InfoInputFile> Input file name
InfoVerbose boolean no --verbose / -v Output additional information

Right-arrow.png Setting / getting Info project properties in scripts

Verify - verify the integrity of a CHD input file Verify project icon

The Verify project type will recalculate the SHA1 check-sum of a given CHD input file, compare it to the one stored in the CHD header, thus verifying the file's integrity.

Verify project screen shot

Verify project properties

Property name

Type

Required?

Corresponding chdman verify option

Description

VerifyInputFile string yes --input / -i <VerifyInputFile> Input file name
VerifyParentInputFile string no --inputparent / -ip <VerifyParentInputFile> Parent file name for input CHD

Right-arrow.png Setting / getting Verify project properties in scripts

Copy - copy data from one CHD to another Copy project icon

The Copy project type is used to copy the data from one CHD file to another. If the version of the source CHD's format is older than the latest and greatest format (currently CHD v5) it will also be implicitly updated by this process.

Copy project screen shot

Copy project properties

Property name

Type

Required?

Corresponding chdman copy option

Description

CopyInputFile string yes --input / -i <CopyInputFile> Input file name
CopyParentInputFile string no --inputparent / -ip <CopyParentInputFile> Parent file name for input CHD
CopyOutputFile string yes --output / -o <CopyOutputFile> Output file name
CopyParentOutputFile string no --outputparent / -op <CopyParentOutputFile> Parent file name for output CHD
CopyForce boolean no --force / -f Force overwriting existing files
CopyInputStartByte integer no --inputstartbyte / -isb <CopyInputStartByte> Starting byte offset within the input
CopyInputStartHunk integer no --inputstarthunk / -ish <CopyInputStartHunk> Starting hunk offset within the input
CopyInputBytes integer no --inputbytes / -ib <CopyInputBytes> Effective length of input in bytes
CopyInputHunks integer no --inputhunks / -ih <CopyInputHunks> Effective length of input in hunks
CopyHunkSize integer no --hunksize / -hs <CopyHunkSize> Size of each hunk, in bytes
CopyCompressors string no --compression / -c <CopyCompressors> Comma-separated list of compression codecs to use (up to 4)
CopyProcessors integer no --numprocessors / -np <CopyProcessors> Limit the number of processors to use during compression

Right-arrow.png Setting / getting Copy project properties in scripts

CreateRaw - create a raw CHD from an input file CreateRaw project icon

The CreateRaw project type will create a raw CHD file from any input file in the form of a 1:1 binary representation of its contents.

CreateRaw project screen shot

CreateRaw project properties

Property name

Type

Required?

Corresponding chdman createraw option

Description

CreateRawInputFile string yes --input / -i <CreateRawInputFile> Input file name
CreateRawOutputFile string yes --output / -o <CreateRawOutputFile> Output file name
CreateRawParentOutputFile string no --outputparent / -op <CreateRawParentOutputFile> Parent file name for output CHD
CreateRawForce boolean no --force / -f Force overwriting existing files
CreateRawInputStartByte integer no --inputstartbyte / -isb <CreateRawInputStartByte> Starting byte offset within the input
CreateRawInputStartHunk integer no --inputstarthunk / -ish <CreateRawInputStartHunk> Starting hunk offset within the input
CreateRawInputBytes integer no --inputbytes / -ib <CreateRawInputBytes> Effective length of input in bytes
CreateRawInputHunks integer no --inputhunks / -ih <CreateRawInputHunks> Effective length of input in hunks
CreateRawHunkSize integer yes --hunksize / -hs <CreateRawHunkSize> Size of each hunk, in bytes
CreateRawUnitSize integer yes --unitsize / -us <CreateRawUnitSize> Size of each unit, in bytes
CreateRawCompressors string no --compression / -c <CreateRawCompressors> Comma-separated list of compression codecs to use (up to 4)
CreateRawProcessors integer no --numprocessors / -np <'CreateRawProcessors> Limit the number of processors to use during compression

Right-arrow.png Setting / getting CreateRaw project properties in scripts

CreateHD - create an HD CHD from an input file CreateHD project icon

The CreateHD project type is used to create an HD CHD from an input file assumed to be a hard disk image.

CreateHD project screen shot

CreateHD project properties

Property name

Type

Required?

Corresponding chdman createhd option

Description

CreateHDInputFile string no --input / -i <CreateHDInputFile> Input file name
CreateHDOutputFile string yes --output / -o <CreateHDOutputFile> Output file name
CreateHDParentOutputFile string no --outputparent / -op <CreateHDParentOutputFile> Parent file name for output CHD
CreateHDForce boolean no --force / -f Force overwriting existing files
CreateHDInputStartByte integer no --inputstartbyte / -isb <CreateHDInputStartByte> Starting byte offset within the input
CreateHDInputStartHunk integer no --inputstarthunk / -ish <CreateHDInputStartHunk> Starting hunk offset within the input
CreateHDInputBytes integer no --inputbytes / -ib <CreateHDInputBytes> Effective length of input in bytes
CreateHDInputHunks integer no --inputhunks / -ih <CreateHDInputHunks> Effective length of input in hunks
CreateHDHunkSize integer no --hunksize / -hs <CreateHDHunkSize> Size of each hunk, in bytes
CreateHDCompressors string no --compression / -c <CreateHDCompressors> Comma-separated list of compression codecs to use (up to 4)
CreateHDProcessors integer no --numprocessors / -np <CreateHDProcessors> Limit the number of processors to use during compression
CreateHDSectorSize integer no --sectorsize / -ss <CreateHDSectorSize> Size of each hard disk sector
CreateHDCylinders integer no --chs / -chs <CreateHDCylinders,heads,sectors> Specifies C-H-S values directly
CreateHDHeads integer no --chs / -chs <cylinders,CreateHDHeads,sectors> Specifies C-H-S values directly
CreateHDSectors integer no --chs / -chs <cylinders,heads,CreateHDSectors> Specifies C-H-S values directly

Right-arrow.png Setting / getting CreateHD project properties in scripts

CreateCD - create a CD CHD from an input file CreateCD project icon

The CreateCD project type will produce a CD CHD from an input file assumed to be a CD image.

CreateCD project screen shot

CreateCD project properties

Property name

Type

Required?

Corresponding chdman createcd option

Description

CreateCDInputFile string yes --input / -i <CreateCDInputFile> Input file name
CreateCDOutputFile string yes --output / -o <CreateCDOutputFile> Output file name
CreateCDParentOutputFile string no --outputparent / -op <CreateCDParentOutputFile> Parent file name for output CHD
CreateCDForce boolean no --force / -f Force overwriting existing files
CreateCDHunkSize integer no --hunksize / -hs <CreateCDHunkSize> Size of each hunk, in bytes
CreateCDCompressors string no --compression / -c <CreateCDCompressors> Comma-separated list of compression codecs to use (up to 4)
CreateCDProcessors integer no --numprocessors / -np <CreateCDProcessors> Limit the number of processors to use during compression

Right-arrow.png Setting / getting CreateCD project properties in scripts

CreateLD - create an LD CHD from an input file CreateLD project icon

The CreateLD project type is used to produce an LD CHD from an AVI video input file.

CreateLD project screen shot

CreateLD project properties

Property name

Type

Required?

Corresponding chdman createld option

Description

CreateLDInputFile string yes --input / -i <CreateLDInputFile> Input file name
CreateLDOutputFile string yes --output / -o <CreateLDOutputFile> Output file name
CreateLDParentOutputFile string no --outputparent / -op <CreateLDParentOutputFile> Parent file name for output CHD
CreateLDForce boolean no --force / -f Force overwriting existing files
CreateLDInputStartFrame integer no --inputstartframe / -isf <CreateLDInputStartFrame> Starting frame within the input
CreateLDInputFrames integer no --inputframes / -if <CreateLDInputFrames> Effective length of input in frames
CreateLDHunkSize integer no --hunksize / -hs <CreateLDHunkSize> Size of each hunk, in bytes
CreateLDCompressors string no --compression, -c <CreateLDCompressors> Comma-separated list of compression codecs to use (up to 4)
CreateLDProcessors integer no --numprocessors / -np <CreateLDProcessors> Limit the number of processors to use during compression

Right-arrow.png Setting / getting CreateLD project properties in scripts

ExtractRaw - extract a raw file from a CHD input file ExtractRaw project icon

The ExtractRaw project type will extract a raw file (1:1 binary representation of its contents) from a CHD file.

ExtractRaw project screen shot

ExtractRaw project properties

Property name

Type

Required?

Corresponding chdman extractraw option

Description

ExtractRawInputFile string yes --input / -i <ExtractRawInputFile> Input file name
ExtractRawParentInputFile string no --inputparent / -ip <ExtractRawParentInputFile> Parent file name for input CHD
ExtractRawOutputFile string yes --output / -o <ExtractRawOutputFile> Output file name
ExtractRawForce boolean no --force / -f Force overwriting existing files
ExtractRawInputStartByte integer no --inputstartbyte / -isb <ExtractRawInputStartByte> Starting byte offset within the input
ExtractRawInputStartHunk integer no --inputstarthunk / -ish <ExtractRawInputStartHunk> Starting hunk offset within the input
ExtractRawInputBytes integer no --inputbytes / -ib <ExtractRawInputBytes> Effective length of input in bytes
ExtractRawInputHunks integer no --inputhunks / -ih <ExtractRawInputHunks> Effective length of input in hunks

Right-arrow.png Setting / getting ExtractRaw project properties in scripts

ExtractHD - extract an HD file from a CHD input file ExtractHD project icon

The ExtractHD project type is used to extract a hard disk image from a CHD file.

ExtractHD project screen shot

ExtractHD project properties

Property name

Type

Required?

Corresponding chdman extracthd option

Description

ExtractHDInputFile string yes --input / -i <ExtractHDInputFile> Input file name
ExtractHDParentInputFile string no --inputparent / -ip <ExtractHDParentInputFile> Parent file name for input CHD
ExtractHDOutputFile string yes --output / -o <ExtractHDOutputFile> Output file name
ExtractHDForce boolean no --force / -f Force overwriting existing files
ExtractHDInputStartByte integer no --inputstartbyte / -isb <ExtractHDInputStartByte> Starting byte offset within the input
ExtractHDInputStartHunk integer no --inputstarthunk / -ish <ExtractHDInputStartHunk> Starting hunk offset within the input
ExtractHDInputBytes integer no --inputbytes / -ib <ExtractHDInputBytes> Effective length of input in bytes
ExtractHDInputHunks integer no --inputhunks / -ih <ExtractHDInputHunks> Effective length of input in hunks

Right-arrow.png Setting / getting ExtractHD project properties in scripts

ExtractCD - extract a CD file from a CHD input file ExtractCD project icon

The ExtractCD project type will extract a CD image from a CHD file.

ExtractCD project screen shot

ExtractCD project properties

Property name

Type

Required?

Corresponding chdman extractcd option

Description

ExtractCDInputFile string yes --input / -i <ExtractCDInputFile> Input file name
ExtractCDParentInputFile string no --inputparent / -ip <ExtractCDParentInputFile> Parent file name for input CHD
ExtractCDOutputFile string yes --output / -p <ExtractCDOutputFile> Output file name
ExtractCDOutputBinFile string no --outputbin / -ob <ExtractCDOutputBinFile> Output file name for binary data
ExtractCDForce boolean no --force / -f Force overwriting existing files

Right-arrow.png Setting / getting ExtractCD project properties in scripts

ExtractLD - extract an LD AVI file from a CHD input file ExtractLD project icon

The ExtractLD project type is used to extract an LD video from a CHD file, storing it as an AVI file.

ExtractLD project screen shot

ExtractLD project properties

Property name

Type

Required?

Corresponding chdman extractld option

Description

ExtractLDInputFile string yes --input / -i <ExtractLDInputFile> Input file name
ExtractLDParentInputFile string no --inputparent / -ip <ExtractLDParentInputFile> Parent file name for input CHD
ExtractLDOutputFile string yes --output / -o <ExtractLDOutputFile> Output file name
ExtractLDForce boolean no --force / -f Force overwriting existing files
ExtractLDInputStartFrame integer no --inputstartframe / -isf <ExtractLDInputStartFrame> Starting frame within the input
ExtractLDInputFrames integer no --inputframes / -if <ExtractLDInputFrames> Effective length of input in frames

Right-arrow.png Setting / getting ExtractLD project properties in scripts

DumpMeta - dump meta-data from a CHD DumpMeta project icon

The DumpMeta project type can be used to dump meta-data stored under a given tag in a CHD file.

DumpMeta project screen shot

DumpMeta project properties

Property name

Type

Required?

Corresponding chdman dumpmeta option

Description

DumpMetaInputFile string yes --input / -i <DumpMetaInputFile> Input file name
DumpMetaOutputFile string no --output / -o <DumpMetaOutputFile> Output file name
DumpMetaForce boolean no --force / -f Force overwriting existing files
DumpMetaTag string yes --tag / -t <DumpMetaTag> 4-character tag for meta-data
DumpMetaIndex integer no --index / -ix <DumpMetaIndex> Indexed instance of this meta-data tag

Right-arrow.png Setting / getting DumpMeta project properties in scripts

AddMeta - add meta-data to a CHD AddMeta project icon

The AddMeta project type can be used to store any meta-data in a CHD file, under a given tag.

AddMeta project screen shot

AddMeta project properties

Property name

Type

Required?

Corresponding chdman addmeta option

Description

AddMetaInputFile string yes --input / -i <AddMetaInputFile> Input file name
AddMetaValueFile string no --valuefile / -vf <AddMetaValueFile> File containing data to add
AddMetaValueText string no --valuetext / -vt <AddMetaValueText> Text added as meta-data
AddMetaTag string yes --tag / -t <AddMetaTag> 4-character tag for meta-data
AddMetaIndex integer no --index / -ix <AddMetaIndex> Indexed instance of this meta-data tag
AddMetaNoCheckSum boolean no --nochecksum / -nocs Don't include this meta-data information in the overall SHA-1 check-sum

Right-arrow.png Setting / getting AddMeta project properties in scripts

DelMeta - remove meta-data from a CHD DelMeta project icon

The DelMeta project type can be used to remove meta-data (stored under a given tag) from a CHD file.

DelMeta project screen shot

DelMeta project properties

Property name

Type

Required?

Corresponding chdman delmeta option

Description

DelMetaInputFile string yes --input / -i <DelMetaInputFile> Input file name
DelMetaTag string yes --tag / -t <DelMetaTag> 4-character tag for meta-data
DelMetaIndex integer no --index / -ix <DelMetaIndex> Indexed instance of this meta-data tag

Right-arrow.png Setting / getting DelMeta project properties in scripts

Scripting

Qt CHDMAN GUI comes with built-in scripting capabilities based on QtScript, which language-wise is 99.9% the same as most current JavaScript implementations (see ECMAScript language specification for details).

Besides many other useful things, QtScript allows for mapping a Qt C++ object to an object within a script, and qchdman makes heavy use of this technique by exposing the script-engine's object and its slots (script-invokable methods / functions) to the script through a pre-defined object named scriptEngine (alias name: qchdman). See the script-engine interface section for details about the available methods / functions.

Scripting in the context of qchdman could mean to define any number of projects, running them (in parallel), synchronizing their executions, acting upon their return codes, using their outputs as inputs for another set of projects... you get the impression. It could actually mean whatever one could think of. Be creative :)!

Script examples

The following example script creates four individual Verify projects by loading them from previously created qchdman project files (qchdman.projectCreateFromFile()), then clones those four projects to get a total number of eight projects (qchdman.projectClone()) which - after preparing / resetting the progress bar (qchdman.progressSetRange() / qchdman.progressSetValue()) - will all subsequently be run in parallel (qchdman.runProjects()). The script will be blocked until all eight processes have finished, thus synchronizing all projects (qchdman.syncProjects()). Running and synchronizing will be repeated for five times in which the progress bar will be updated accordingly (qchdman.progressSetValue()). Finally, all projects will be destroyed as a clean up measure (qchdman.destroyProjects()).

Admittedly, this example script isn't very useful, it just demonstrates some of the available features and the (potential) parallelism of multiple running projects.

Script example screen shot

Similar to projects, the GUI representation for scripts - a so called script-widget (File -> New script / Ctrl+Shift+N) - contains a run-button (Run icon) that you need to click in order to start script execution. To terminate a running script prematurely, click the stop-button (Stop icon). Script-widgets also have a menu attached to their tools-button (Toolbox icon) which contains items to access additional script-centric features.

Note that project clean up as well as garbage collection will take place automatically whenever necessary.

Here's a much more useful and advanced script that's also contained in our script example collection you can download and modify / extend to your needs:

Script example screen shot

Debugger

The script engine has a built-in debugger that you can open by putting the keyword debugger in one of the first lines of a script:

Debugger window

Also, when a script encounters an error, the debugger window will be opened / raised automatically.

Script engine interface

All qchdman-specific functionality - and important features that aren't natively included in QtScript (like functions to search for local files / folders or to retrieve user input) - are implemented via script-invokable methods of the script engine class (ScriptEngine), exposing the respective script engine instance to QtScript as the pre-defined object named scriptEngine or qchdman (alias names).

The following sections list all publicly exposed script engine functions that you can access in a script as scriptEngine.functionName() or qchdman.functionName().

Note that every qchdman script has its own engine and there's no interference between them, even when they run in parallel. However, they all utilize the same event-loop (Qt's main event-loop) which causes scripts to get stuck when an application modal dialog is opened in the GUI while they're executing. We've revised all modal dialogs of qchdman itself to not stop the running event-loop and replace it with the dialog's one (that is, the preferences and about dialogs can safely be used) - but there's actually nothing we can (or want to) do about it when it comes to the common file open / save dialogs that we use for convenience, and the About Qt dialog. So take care not to use any of them during script-execution!

Utility functions

Script engine function

Return type

Description

log(message) -- Prints message (string, required) to the script-log, including the current time stamp.
dumpHardDiskTemplates() -- Dumps the list of known hard-disk templates to the script-log.
runShellCommand(command, detached) integer Starts command (string, required) in a sub-shell. When detached (boolean, optional, default: false) is false, the script will be blocked until the external command finishes and its integer shell return code will be returned to the caller. When detached is true, command will be started in the background, not blocking the script (in this case, 0 is returned when the command could be started successfully, or 1 in case of an error). Note that you cannot synchronize on shell commands, so any detached process will be spawned... and forgotten.
operatingSystemName() string Returns the name of the operating system. Possible OS names: Linux, UNIX, Darwin (Mac OS X), Windows or Unknown.
numberOfCPUs() integer Returns the detected number of CPUs (cores) in the system.
createPath(path) boolean Creates the folder path (string, required). This function will create all parent directories necessary to create the given path. Returns true upon successful path creation, otherwise false (new since qchdman 0.20).
removePath(path) boolean Removes the folder path (string, required). This function will remove all parent directories in path, provided that they are empty. Returns true upon successful path removal, otherwise false (new since qchdman 0.20).

Looking up files and folders

Script engine function

Return type

Description

dirEntryList(path, filter, sort, ascending) string-list array Returns the list of files contained in the directory path (string, required), using the given file name filter (string, optional, default: empty) if set. The returned array is sorted alpha-numerically if sort (boolean, optional, default: true) is true, in the order specified by ascending (boolean, optional, default: true).
dirSubDirList(path, filter, sort, ascending) string-list array Returns the list of folders contained in the directory path (string, required), using the given folder name filter (string, optional, default: empty) if set. The returned array is sorted alpha-numerically if sort (boolean, optional, default: true) is true, in the order specified by ascending (boolean, optional, default: true).
dirStartEntryList(path, filter, subDirs) -- Starts an iteration over the list of files / folders contained in the directory path (string, required), using the given file / folder name filter (string, optional, default: empty) if set. If subDirs (boolean, optional, default: false) is true the search will be done on folders, otherwise files will be searched.
dirHasNextEntry() boolean Returns true when the current file / folder entry iteration has at least one more entry to offer, otherwise false.
dirNextEntry() string Returns the next entry of the current file / folder entry iteration (if any, returns an empty string otherwise).

Retrieving user input

Script engine function

Return type

Description

inputGetFilePath(initialPath, filter, windowTitle) string Opens a file input dialog and returns the chosen file path. If initialPath (string, optional, default: empty) is non-empty it will be used as the initially chosen path (if the file exists). The filter argument (string, optional, default: empty) can be used to specify any file name filters for the dialog, and the windowTitle (string, optional, default: empty) is used to specify the dialog window's title (a default title is shown when windowTitle is empty). When the dialog is canceled, an empty string is returned. You can also use inputOk() to determine if the user confirmed the input (OK clicked) or not (input canceled).
inputGetFolderPath(initialPath, windowTitle) string Opens a folder input dialog and returns the chosen folder path. If initialPath (string, optional, default: empty) is non-empty it will be used as the initially chosen path (if the folder exists). The windowTitle (string, optional, default: empty) can be used to specify the dialog window's title (a default title is shown when windowTitle is empty). When the dialog is canceled, an empty string is returned. You can also use inputOk() to determine if the user confirmed the input (OK clicked) or not (input canceled).
inputGetStringValue(initialValue, windowTitle, labelText) string Opens a dialog for letting the user input a string value (free-form text) and returns it. If initialValue (string, optional, default: empty) is given it will be used as the initial text. The windowTitle (string, optional, default: empty) can be used to specify the dialog window's title (a default title is shown when windowTitle is empty), and labelText (string, optional, default: empty) would replace the default label text. When the dialog is canceled, an empty string is returned. You can also use inputOk() to determine if the user confirmed the input (OK clicked) or not (input canceled).
inputGetListItem(initialValue, itemList, editable, windowTitle, labelText) string Opens a dialog for letting the user choose from a list of textual items and returns the chosen item's text. The itemList (string-list array, optional, default: empty) specifies the list of items to be inserted into the drop-down list. If initialValue (string, optional, default: empty) is given it will be used as the initially chosen item text (if it's included in itemList, otherwise the first item will be selected). When editable (boolean, optional, default: false) is true, the currently displayed text can be edited by the user. The windowTitle (string, optional, default: empty) can be used to specify the dialog window's title (a default title is shown when windowTitle is empty), and labelText (string, optional, default: empty) would replace the default label text. Use inputOk() to determine if the user confirmed the input (OK clicked) or not (input canceled).
inputGetIntValue(initialValue, windowTitle, labelText) integer Opens a dialog for letting the user enter an integer value and returns it. If initialValue (integer, optional, default: 0) is passed it will be used as the initial value. The windowTitle (string, optional, default: empty) is used to specify the dialog window's title (a default title is shown when windowTitle is empty), and labelText (string, optional, default: empty) would replace the default label text. Use inputOk() to determine if the user confirmed the input (OK clicked) or not (input canceled).
inputGetDoubleValue(initialValue, decimals, windowTitle, labelText) floating point number Opens a dialog for letting the user enter a floating point value and returns it. If initialValue (floating point number, optional, default: 0.0) is passed it will be used as the initial value. The value's precision can be specified by the number of decimals (integer, optional, default: 2). The windowTitle (string, optional, default: empty) is used to specify the dialog window's title (a default title is shown when windowTitle is empty), and labelText (string, optional, default: empty) would replace the default label text. Use inputOk() to determine if the user confirmed the input (OK clicked) or not (input canceled).
inputOk() boolean Returns the status of the last user input: true is returned when the user clicked OK, false is returned when the dialog was canceled.

Progress bar

Script engine function

Return type

Description

progressSetRange(min, max) -- Sets the range of the script-widget's progress bar to go from min (integer, required) to max (integer, required).
progressSetValue(value) -- Sets the current value (integer, required) of the script-widget's progress bar.
progressGetValue() integer Returns the current value of the script-widget's progress bar.

Project creation / destruction / status

Script engine function

Return type

Description

projectCreate(id, type) -- Creates a new project with the name id (string, required) of the given type (string, required). The allowed project types are case-sensitive and include Info, Verify, Copy, CreateRaw, CreateHD, CreateCD, CreateLD, ExtractRaw, ExtractHD, ExtractCD, ExtractLD, DumpMeta, AddMeta and DelMeta.
projectCreateFromFile(id, fileName) -- Creates a new project with the name id (string, required) by loading it from the file pointed to by fileName (string, required) which is assumed to be in qchdman's project format.
projectCreateFromString(id, buffer) -- Creates a new project with the name id (string, required) by loading it from buffer (string, required) which is assumed to be in qchdman's project format.
projectClone(sourceId, destinationId) -- Creates a new project with the name destinationId (string, required) by cloning it from the project named sourceId (string, required).
projectDestroy(id) -- Destroys the project named id (string, required).
projectStatus(id) string Returns the current status of the project named id (string, required). The returned status string can be any of the following: unknown, idle, running, finished, terminated, crashed or error.
projectReturnCode(id) integer Returns the shell return code from the last run of chdman by the project named id (string, required). Returns -1 if the project hasn't run yet or is unknown.
projectSetType(id, type) -- Sets the type (string, required) of the project named id (string, required). See projectCreate() for available project types.
projectGetType(id) string Returns the type of the project named id (string, required). See projectCreate() for available project types.
projectToWindow(id) -- Creates a new project window from the project named id (string, required), giving up access to it script-wise (the script-representation of the project will be destroyed).
projectCloneToWindow(sourceId) -- Creates a new project window by cloning it from the project named sourceId (string, required).

Project control

Script engine function

Return type

Description

runProjects(idList) -- Starts the comma-separated list of projects specified in idList (string, optional, default: empty). If idList is empty, ALL currently existing projects will be started. When a project given in idList is already running it will be ignored.
stopProjects(idList) -- Stops the comma-separated list of projects specified in idList (string, optional, default: empty). If idList is empty, ALL currently running projects will be stopped. When a project given in idList isn't currently running it will be ignored.
syncProjects(idList) -- Synchronizes the comma-separated list of projects specified in idList (string, optional, default: empty). If idList is empty, synchronization will take place for ALL currently running projects. When a project given in idList isn't currently running it will be ignored. Calling this function will block script execution until all projects specified in idList have completed, thus synchronizing them.
destroyProjects(idList) -- Destroys the comma-separated list of projects specified in idList (string, optional, default: empty). If idList is empty, ALL currently existing projects will be destroyed.
waitForRunningProjects(numProjects) -- Blocks script execution until numProjects (integer, optional, default: 1) projects have finished.
runningProjects() integer Returns the number of currently running projects under the control of this script engine.

Setting / getting Info project properties

Script engine function

Return type

Description

projectSetInfoInputFile(id, file) -- Sets the property InfoInputFile of the project named id (string, required) to the value file (string, required).
projectGetInfoInputFile(id) string Returns the value of the InfoInputFile property of the project named id (string, required).
projectSetInfoVerbose(id, verbose) -- Sets the property InfoVerbose of the project named id (string, required) to the value verbose (boolean, required).
projectGetInfoVerbose(id) boolean Returns the value of the InfoVerbose property of the project named id (string, required).

Right-arrow.png Info project property details

Setting / getting Verify project properties

Script engine function

Return type

Description

projectSetVerifyInputFile(id, file) -- Sets the property VerifyInputFile of the project named id (string, required) to the value file (string, required).
projectGetVerifyInputFile(id) string Returns the value of the VerifyInputFile property of the project named id (string, required).
projectSetVerifyParentInputFile(id, file) -- Sets the property VerifyParentInputFile of the project named id (string, required) to the value file (string, required).
projectGetVerifyParentInputFile(id) string Returns the value of the VerifyParentInputFile property of the project named id (string, required).

Right-arrow.png Verify project property details

Setting / getting Copy project properties

Script engine function

Return type

Description

projectSetCopyInputFile(id, file) -- Sets the property CopyInputFile of the project named id (string, required) to the value file (string, required).
projectGetCopyInputFile(id) string Returns the value of the CopyInputFile property of the project named id (string, required).
projectSetCopyParentInputFile(id, file) -- Sets the property CopyParentInputFile of the project named id (string, required) to the value file (string, required).
projectGetCopyParentInputFile(id) string Returns the value of the CopyParentInputFile property of the project named id (string, required).
projectSetCopyOutputFile(id, file) -- Sets the property CopyOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCopyOutputFile(id) string Returns the value of the CopyOutputFile property of the project named id (string, required).
projectSetCopyParentOutputFile(id, file) -- Sets the property CopyParentOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCopyParentOutputFile(id) string Returns the value of the CopyParentOutputFile property of the project named id (string, required).
projectSetCopyForce(id, force) -- Sets the property CopyForce of the project named id (string, required) to the value force (boolean, required).
projectGetCopyForce(id) boolean Returns the value of the CopyForce property of the project named id (string, required).
projectSetCopyInputStartByte(id, byte) -- Sets the property CopyInputStartByte of the project named id (string, required) to the value byte (integer, required).
projectGetCopyInputStartByte(id) integer Returns the value of the CopyInputStartByte property of the project named id (string, required).
projectSetCopyInputStartHunk(id, hunk) -- Sets the property CopyInputStartHunk of the project named id (string, required) to the value hunk (integer, required).
projectGetCopyInputStartHunk(id) integer Returns the value of the CopyInputStartHunk property of the project named id (string, required).
projectSetCopyInputBytes(id, bytes) -- Sets the property CopyInputBytes of the project named id (string, required) to the value bytes (integer, required).
projectGetCopyInputBytes(id) integer Returns the value of the CopyInputBytes property of the project named id (string, required).
projectSetCopyInputHunks(id, hunks) -- Sets the property CopyInputHunks of the project named id (string, required) to the value hunks (integer, required).
projectGetCopyInputHunks(id) integer Returns the value of the CopyInputHunks property of the project named id (string, required).
projectSetCopyHunkSize(id, size) -- Sets the property CopyHunkSize of the project named id (string, required) to the value size (integer, required).
projectGetCopyHunkSize(id) integer Returns the value of the CopyHunkSize property of the project named id (string, required).
projectSetCopyCompressors(id, compressors) -- Sets the property CopyCompressors of the project named id (string, required) to the value compressors (string, required).
projectGetCopyCompressors(id) string Returns the value of the CopyCompressors property of the project named id (string, required).
projectSetCopyProcessors(id, processors) -- Sets the property CopyProcessors of the project named id (string, required) to the value processors (integer, required).
projectGetCopyProcessors(id) integer Returns the value of the CopyProcessors property of the project named id (string, required).

Right-arrow.png Copy project property details

Setting / getting CreateRaw project properties

Script engine function

Return type

Description

projectSetCreateRawInputFile(id, file) -- Sets the property CreateRawInputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateRawInputFile(id) string Returns the value of the CreateRawInputFile property of the project named id (string, required).
projectSetCreateRawOutputFile(id, file) -- Sets the property CreateRawOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateRawOutputFile(id) string Returns the value of the CreateRawOutputFile property of the project named id (string, required).
projectSetCreateRawParentOutputFile(id, file) -- Sets the property CreateRawParentOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateRawParentOutputFile(id) string Returns the value of the CreateRawParentOutputFile property of the project named id (string, required).
projectSetCreateRawForce(id, force) -- Sets the property CreateRawForce of the project named id (string, required) to the value force (boolean, required).
projectGetCreateRawForce(id) boolean Returns the value of the CreateRawForce property of the project named id (string, required).
projectSetCreateRawInputStartByte(id, byte) -- Sets the property CreateRawInputStartByte of the project named id (string, required) to the value byte (integer, required).
projectGetCreateRawInputStartByte(id) integer Returns the value of the CreateRawInputStartByte property of the project named id (string, required).
projectSetCreateRawInputStartHunk(id, hunk) -- Sets the property CreateRawInputStartHunk of the project named id (string, required) to the value hunk (integer, required).
projectGetCreateRawInputStartHunk(id) integer Returns the value of the CreateRawInputStartHunk property of the project named id (string, required).
projectSetCreateRawInputBytes(id, bytes) -- Sets the property CreateRawInputBytes of the project named id (string, required) to the value bytes (integer, required).
projectGetCreateRawInputBytes(id) integer Returns the value of the CreateRawInputBytes property of the project named id (string, required).
projectSetCreateRawInputHunks(id, hunks) -- Sets the property CreateRawInputHunks of the project named id (string, required) to the value hunks (integer, required).
projectGetCreateRawInputHunks(id) integer Returns the value of the CreateRawInputHunks property of the project named id (string, required).
projectSetCreateRawHunkSize(id, size) -- Sets the property CreateRawHunkSize of the project named id (string, required) to the value size (integer, required).
projectGetCreateRawHunkSize(id) integer Returns the value of the CreateRawHunkSize property of the project named id (string, required).
projectSetCreateRawUnitSize(id, size) -- Sets the property CreateRawUnitSize of the project named id (string, required) to the value size (integer, required).
projectGetCreateRawUnitSize(id) integer Returns the value of the CreateRawUnitSize property of the project named id (string, required).
projectSetCreateRawCompressors(id, compressors) -- Sets the property CreateRawCompressors of the project named id (string, required) to the value compressors (string, required).
projectGetCreateRawCompressors(id) string Returns the value of the CreateRawCompressors property of the project named id (string, required).
projectSetCreateRawProcessors(id, processors) -- Sets the property CreateRawProcessors of the project named id (string, required) to the value processors (integer, required).
projectGetCreateRawProcessors(id) integer Returns the value of the CreateRawProcessors property of the project named id (string, required).

Right-arrow.png CreateRaw project property details

Setting / getting CreateHD project properties

Script engine function

Return type

Description

projectSetCreateHDInputFile(id, file) -- Sets the property CreateHDInputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateHDInputFile(id) string Returns the value of the CreateHDInputFile property of the project named id (string, required).
projectSetCreateHDOutputFile(id, file) -- Sets the property CreateHDOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateHDOutputFile(id) string Returns the value of the CreateHDOutputFile property of the project named id (string, required).
projectSetCreateHDParentOutputFile(id, file) -- Sets the property CreateHDParentOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateHDParentOutputFile(id) string Returns the value of the CreateHDParentOutputFile property of the project named id (string, required).
projectSetCreateHDForce(id, force) -- Sets the property CreateHDForce of the project named id (string, required) to the value force (boolean, required).
projectGetCreateHDForce(id) boolean Returns the value of the CreateHDForce property of the project named id (string, required).
projectSetCreateHDInputStartByte(id, byte) -- Sets the property CreateHDInputStartByte of the project named id (string, required) to the value byte (integer, required).
projectGetCreateHDInputStartByte(id) integer Returns the value of the CreateHDInputStartByte property of the project named id (string, required).
projectSetCreateHDInputStartHunk(id, hunk) -- Sets the property CreateHDInputStartHunk of the project named id (string, required) to the value hunk (integer, required).
projectGetCreateHDInputStartHunk(id) integer Returns the value of the CreateHDInputStartHunk property of the project named id (string, required).
projectSetCreateHDInputBytes(id, bytes) -- Sets the property CreateHDInputBytes of the project named id (string, required) to the value bytes (integer, required).
projectGetCreateHDInputBytes(id) integer Returns the value of the CreateHDInputBytes property of the project named id (string, required).
projectSetCreateHDInputHunks(id, hunks) -- Sets the property CreateHDInputHunks of the project named id (string, required) to the value hunks (integer, required).
projectGetCreateHDInputHunks(id) integer Returns the value of the CreateHDInputHunk property of the project named id (string, required).
projectSetCreateHDHunkSize(id, size) -- Sets the property CreateHDHunkSize of the project named id (string, required) to the value size (integer, required).
projectGetCreateHDHunkSize(id) integer Returns the value of the CreateHDHunkSize property of the project named id (string, required).
projectSetCreateHDCompressors(id, compressors) -- Sets the property CreateHDCompressors of the project named id (string, required) to the value compressors (string, required).
projectGetCreateHDCompressors(id) string Returns the value of the CreateHDCompressors property of the project named id (string, required).
projectSetCreateHDProcessors(id, processors) -- Sets the property CreateHDProcessors of the project named id (string, required) to the value processors (integer, required).
projectGetCreateHDProcessors(id) integer Returns the value of the CreateHDProcessors property of the project named id (string, required).
projectSetCreateHDSectorSize(id, sectorSize) -- Sets the property CreateHDSectorSize of the project named id (string, required) to the value sectorSize (integer, required).
projectGetCreateHDSectorSize(id) integer Returns the value of the CreateHDSectorSize property of the project named id (string, required).
projectSetCreateHDCylinders(id, cylinders) -- Sets the property CreateHDCylinders of the project named id (string, required) to the value cylinders (integer, required).
projectGetCreateHDCylinders(id) integer Returns the value of the CreateHDCylinders property of the project named id (string, required).
projectSetCreateHDHeads(id, heads) -- Sets the property CreateHDHeads of the project named id (string, required) to the value heads (integer, required).
projectGetCreateHDHeads(id) integer Returns the value of the CreateHDHeads property of the project named id (string, required).
projectSetCreateHDSectors(id, sectors) -- Sets the property CreateHDSectors of the project named id (string, required) to the value sectors (integer, required).
projectGetCreateHDSectors(id) integer Returns the value of the CreateHDSectors property of the project named id (string, required).

Right-arrow.png CreateHD project property details

There's also a related convenience function to set the C-H-S (and sector-size) values from a known hard-disk template:

Script engine function

Return type

Description

projectSetCreateHDChsFromTemplate(id, vendorName, diskName) --

Sets the values of the CreateHDSectorSize, CreateHDCylinders, CreateHDHeads and CreateHDSectors properties of the project named id (string, required) from an existing hard-disk template defined by vendorName (string, required) and diskName (string, required) - provided the template is found. The CreateHDCompressors property will be set to 'none' upon success (to create a writable CHD). Use dumpHardDiskTemplates() to see the full list of known templates.

Setting / getting CreateCD project properties

Script engine function

Return type

Description

projectSetCreateCDInputFile(id, file) -- Sets the property CreateCDInputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateCDInputFile(id) string Returns the value of the CreateCDInputFile property of the project named id (string, required).
projectSetCreateCDOutputFile(id, file) -- Sets the property CreateCDOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateCDOutputFile(id) string Returns the value of the CreateCDOutputFile property of the project named id (string, required).
projectSetCreateCDParentOutputFile(id, file) -- Sets the property CreateCDParentOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateCDParentOutputFile(id) string Returns the value of the CreateCDParentOutputFile property of the project named id (string, required).
projectSetCreateCDForce(id, force) -- Sets the property CreateCDForce of the project named id (string, required) to the value force (boolean, required).
projectGetCreateCDForce(id) boolean Returns the value of the CreateCDForce property of the project named id (string, required).
projectSetCreateCDHunkSize(id, size) -- Sets the property CreateCDHunkSize of the project named id (string, required) to the value size (integer, required).
projectGetCreateCDHunkSize(id) integer Returns the value of the CreateCDHunkSize property of the project named id (string, required).
projectSetCreateCDCompressors(id, compressors) -- Sets the property CreateCDCompressors of the project named id (string, required) to the value compressors (string, required).
projectGetCreateCDCompressors(id) string Returns the value of the CreateCDCompressors property of the project named id (string, required).
projectSetCreateCDProcessors(id, processors) -- Sets the property CreateCDProcessors of the project named id (string, required) to the value processors (integer, required).
projectGetCreateCDProcessors(id) integer Returns the value of the CreateCDProcessors property of the project named id (string, required).

Right-arrow.png CreateCD project property details

Setting / getting CreateLD project properties

Script engine function

Return type

Description

projectSetCreateLDInputFile(id, file) -- Sets the property CreateLDInputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateLDInputFile(id) string Returns the value of the CreateLDInputFile property of the project named id (string, required).
projectSetCreateLDOutputFile(id, file) -- Sets the property CreateLDOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateLDOutputFile(id) string Returns the value of the CreateLDOutputFile property of the project named id (string, required).
projectSetCreateLDParentOutputFile(id, file) -- Sets the property CreateLDParentOutputFile of the project named id (string, required) to the value file (string, required).
projectGetCreateLDParentOutputFile(id) string Returns the value of the CreateLDParentOutputFile property of the project named id (string, required).
projectSetCreateLDForce(id, force) -- Sets the property CreateLDForce of the project named id (string, required) to the value force (boolean, required).
projectGetCreateLDForce(id) boolean Returns the value of the CreateLDForce property of the project named id (string, required).
projectSetCreateLDInputStartFrame(id, frame) -- Sets the property CreateLDInputStartFrame of the project named id (string, required) to the value frame (integer, required).
projectGetCreateLDInputStartFrame(id) integer Returns the value of the CreateLDInputStartFrame property of the project named id (string, required).
projectSetCreateLDInputFrames(id, frames) -- Sets the property CreateLDInputFrames of the project named id (string, required) to the value frames (integer, required).
projectGetCreateLDInputFrames(id) integer Returns the value of the CreateLDInputFrames property of the project named id (string, required).
projectSetCreateLDHunkSize(id, size) -- Sets the property CreateLDHunkSize of the project named id (string, required) to the value size (integer, required).
projectGetCreateLDHunkSize(id) integer Returns the value of the CreateLDHunkSize property of the project named id (string, required).
projectSetCreateLDCompressors(id, compressors) -- Sets the property CreateLDCompressors of the project named id (string, required) to the value compressors (string, required).
projectGetCreateLDCompressors(id) string Returns the value of the CreateLDCompressors property of the project named id (string, required).
projectSetCreateLDProcessors(id, processors) -- Sets the property CreateLDProcessors of the project named id (string, required) to the value processors (integer, required).
projectGetCreateLDProcessors(id) integer Returns the value of the CreateLDProcessors property of the project named id (string, required).

Right-arrow.png CreateLD project property details

Setting / getting ExtractRaw project properties

Script engine function

Return type

Description

projectSetExtractRawInputFile(id, file) -- Sets the property ExtractRawInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractRawInputFile(id) string Returns the value of the ExtractRawInputFile property of the project named id (string, required).
projectSetExtractRawParentInputFile(id, file) -- Sets the property ExtractRawParentInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractRawParentInputFile(id) string Returns the value of the ExtractRawParentInputFile property of the project named id (string, required).
projectSetExtractRawOutputFile(id, file) -- Sets the property ExtractRawOutputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractRawOutputFile(id) string Returns the value of the ExtractRawOutputFile property of the project named id (string, required).
projectSetExtractRawForce(id, force) -- Sets the property ExtractRawForce of the project named id (string, required) to the value force (boolean, required).
projectGetExtractRawForce(id) boolean Returns the value of the ExtractRawForce property of the project named id (string, required).
projectSetExtractRawInputStartByte(id, byte) -- Sets the property ExtractRawInputStartByte of the project named id (string, required) to the value byte (integer, required).
projectGetExtractRawInputStartByte(id) integer Returns the value of the ExtractRawInputStartByte property of the project named id (string, required).
projectSetExtractRawInputStartHunk(id, hunk) -- Sets the property ExtractRawInputStartHunk of the project named id (string, required) to the value hunk (integer, required).
projectGetExtractRawInputStartHunk(id) integer Returns the value of the ExtractRawInputStartHunk property of the project named id (string, required).
projectSetExtractRawInputBytes(id, bytes) -- Sets the property ExtractRawInputBytes of the project named id (string, required) to the value bytes (integer, required).
projectGetExtractRawInputBytes(id) integer Returns the value of the ExtractRawInputBytes property of the project named id (string, required).
projectSetExtractRawInputHunks(id, hunks) -- Sets the property ExtractRawInputHunks of the project named id (string, required) to the value hunks (integer, required).
projectGetExtractRawInputHunks(id) integer Returns the value of the ExtractRawInputHunks property of the project named id (string, required).

Right-arrow.png ExtractRaw project property details

Setting / getting ExtractHD project properties

Script engine function

Return type

Description

projectSetExtractHDInputFile(id, file) -- Sets the property ExtractHDInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractHDInputFile(id) string Returns the value of the ExtractHDInputFile property of the project named id (string, required).
projectSetExtractHDParentInputFile(id, file) -- Sets the property ExtractHDParentInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractHDParentInputFile(id) string Returns the value of the ExtractHDParentInputFile property of the project named id (string, required).
projectSetExtractHDOutputFile(id, file) -- Sets the property ExtractHDOutputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractHDOutputFile(id) string Returns the value of the ExtractHDOutputFile property of the project named id (string, required).
projectSetExtractHDForce(id, force) -- Sets the property ExtractHDForce of the project named id (string, required) to the value force (boolean, required).
projectGetExtractHDForce(id) boolean Returns the value of the ExtractHDForce property of the project named id (string, required).
projectSetExtractHDInputStartByte(id, byte) -- Sets the property ExtractHDInputStartByte of the project named id (string, required) to the value byte (integer, required).
projectGetExtractHDInputStartByte(id) integer Returns the value of the ExtractHDInputStartByte property of the project named id (string, required).
projectSetExtractHDInputStartHunk(id, hunk) -- Sets the property ExtractHDInputStartHunk of the project named id (string, required) to the value hunk (integer, required).
projectGetExtractHDInputStartHunk(id) integer Returns the value of the ExtractHDInputStartHunk property of the project named id (string, required).
projectSetExtractHDInputBytes(id, bytes) -- Sets the property ExtractHDInputBytes of the project named id (string, required) to the value bytes (integer, required).
projectGetExtractHDInputBytes(id) integer Returns the value of the ExtractHDInputBytes property of the project named id (string, required).
projectSetExtractHDInputHunks(id, hunks) -- Sets the property ExtractHDInputHunks of the project named id (string, required) to the value hunks (integer, required).
projectGetExtractHDInputHunks(id) integer Returns the value of the ExtractHDInputHunks property of the project named id (string, required).

Right-arrow.png ExtractHD project property details

Setting / getting ExtractCD project properties

Script engine function

Return type

Description

projectSetExtractCDInputFile(id, file) -- Sets the property ExtractCDInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractCDInputFile(id) string Returns the value of the ExtractCDInputFile property of the project named id (string, required).
projectSetExtractCDParentInputFile(id, file) -- Sets the property ExtractCDParentInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractCDParentInputFile(id) string Returns the value of the ExtractCDParentInputFile property of the project named id (string, required).
projectSetExtractCDOutputFile(id, file) -- Sets the property ExtractCDOutputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractCDOutputFile(id) string Returns the value of the ExtractCDOutputFile property of the project named id (string, required).
projectSetExtractCDOutputBinFile(id, file) -- Sets the property ExtractCDOutputBinFile of the project named id (string, required) to the value file (string, required).
projectGetExtractCDOutputBinFile(id) string Returns the value of the ExtractCDOutputBinFile property of the project named id (string, required).
projectSetExtractCDForce(id, force) -- Sets the property ExtractCDForce of the project named id (string, required) to the value force (boolean, required).
projectGetExtractCDForce(id) boolean Returns the value of the ExtractCDForce property of the project named id (string, required).

Right-arrow.png ExtractCD project property details

Setting / getting ExtractLD project properties

Script engine function

Return type

Description

projectSetExtractLDInputFile(id, file) -- Sets the property ExtractLDInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractLDInputFile(id) string Returns the value of the ExtractLDInputFile property of the project named id (string, required).
projectSetExtractLDParentInputFile(id, file) -- Sets the property ExtractLDParentInputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractLDParentInputFile(id) string Returns the value of the ExtractLDParentInputFile property of the project named id (string, required).
projectSetExtractLDOutputFile(id, file) -- Sets the property ExtractLDOutputFile of the project named id (string, required) to the value file (string, required).
projectGetExtractLDOutputFile(id) string Returns the value of the ExtractLDOutputFile property of the project named id (string, required).
projectSetExtractLDForce(id, force) -- Sets the property ExtractLDForce of the project named id (string, required) to the value force (boolean, required).
projectGetExtractLDForce(id) boolean Returns the value of the ExtractLDForce property of the project named id (string, required).
projectSetExtractLDInputStartFrame(id, frame) -- Sets the property ExtractLDInputStartFrame of the project named id (string, required) to the value frame (integer, required).
projectGetExtractLDInputStartFrame(id) integer Returns the value of the ExtractLDInputStartFrame property of the project named id (string, required).
projectSetExtractLDInputFrames(id, frames) -- Sets the property ExtractLDInputFrames of the project named id (string, required) to the value frames (integer, required).
projectGetExtractLDInputFrames(id) integer Returns the value of the ExtractLDInputFrames property of the project named id (string, required).

Right-arrow.png ExtractLD project property details

Setting / getting DumpMeta project properties

Script engine function

Return type

Description

projectSetDumpMetaInputFile(id, file) -- Sets the property DumpMetaInputFile of the project named id (string, required) to the value file (string, required).
projectGetDumpMetaInputFile(id) string Returns the value of the DumpMetaInputFile property of the project named id (string, required).
projectSetDumpMetaOutputFile(id, file) -- Sets the property DumpMetaOutputFile of the project named id (string, required) to the value file (string, required).
projectGetDumpMetaOutputFile(id) string Returns the value of the DumpMetaOutputFile property of the project named id (string, required).
projectSetDumpMetaForce(id, force) -- Sets the property DumpMetaForce of the project named id (string, required) to the value force (boolean, required).
projectGetDumpMetaForce(id) boolean Returns the value of the DumpMetaForce property of the project named id (string, required).
projectSetDumpMetaTag(id, tag) -- Sets the property DumpMetaTag of the project named id (string, required) to the value tag (string, required)
projectGetDumpMetaTag(id) string Returns the value of the DumpMetaTag property of the project named id (string, required).
projectSetDumpMetaIndex(id, index) -- Sets the property DumpMetaIndex of the project named id (string, required) to the value index (integer, required).
projectGetDumpMetaIndex(id) integer Returns the value of the DumpMetaIndex property of the project named id (string, required).

Right-arrow.png DumpMeta project property details

Setting / getting AddMeta project properties

Script engine function

Return type

Description

projectSetAddMetaInputFile(id, file) -- Sets the property AddMetaInputFile of the project named id (string, required) to the value file (string, required).
projectGetAddMetaInputFile(id) string Returns the value of the AddMetaInputFile property of the project named id (string, required).
projectSetAddMetaValueFile(id, file) -- Sets the property AddMetaValueFile of the project named id (string, required) to the value file (string, required).
projectGetAddMetaValueFile(id) string Returns the value of the AddMetaValueFile property of the project named id (string, required).
projectSetAddMetaValueText(id, text) -- Sets the property AddMetaValueText of the project named id (string, required) to the value text (string, required).
projectGetAddMetaValueText(id) string Returns the value of the AddMetaValueText property of the project named id (string, required).
projectSetAddMetaTag(id, tag) -- Sets the property AddMetaTag of the project named id (string, required) to the value tag (string, required).
projectGetAddMetaTag(id) string Returns the value of the AddMetaTag property of the project named id (string, required).
projectSetAddMetaIndex(id, index) -- Sets the property AddMetaIndex of the project named id (string, required) to the value index (integer, required).
projectGetAddMetaIndex(id) integer Returns the value of the AddMetaIndex property of the project named id (string, required).
projectSetAddMetaNoCheckSum(id, noCheckSum) -- Sets the property AddMetaNoCheckSum of the project named id (string, required) to the value noCheckSum (boolean, required).
projectGetAddMetaNoCheckSum(id) boolean Returns the value of the AddMetaNoCheckSum property of the project named id (string, required).

Right-arrow.png AddMeta project property details

Setting / getting DelMeta project properties

Script engine function

Return type

Description

projectSetDelMetaInputFile(id, file) -- Sets the property DelMetaInputFile of the project named id (string, required) to the value file (string, required).
projectGetDelMetaInputFile(id) string Returns the value of the DelMetaInputFile property of the project named id (string, required).
projectSetDelMetaTag(id, tag) -- Sets the property DelMetaTag of the project named id (string, required) to the value tag (string, required).
projectGetDelMetaTag(id) string Returns the value of the DelMetaTag property of the project named id (string, required).
projectSetDelMetaIndex(id, index) -- Sets the property DelMetaIndex of the project named id (string, required) to the value index (integer, required).
projectGetDelMetaIndex(id) integer Returns the value of the DelMetaIndex property of the project named id (string, required).

Right-arrow.png DelMeta project property details

Script engine signals

The script engine also emits certain signals that you can connect to functions in your script. Example:

...
qchdman.projectStarted.connect(projectStarted);
qchdman.projectFinished.connect(projectFinished);
...
...
...
function projectStarted(id) {
    qchdman.log("project '" + id + "' started!");
}

function projectFinished(id) {
    qchdman.log("project '" + id + "' finished!");
}
...

Project start / finish

Script engine signal

Description

projectStarted(id) This signal is emitted when the project named id (string) has started.
projectFinished(id) This signal is emitted when the project named id (string) has finished.