Scripting Syntax


 * See also scripting on the manual wiki.

=Overview= This page contains information about an expanded Syntax for GetTrackInfo and SetTrackInfo for the scripting feature in Audacity.

GetTrackInfo:
Returns information about one track.

In each of the following commands the value is returned if the setting exists. Not clear what is returned if the setting does not.

Parameters:

Examples:

SetTrackInfo:
Sets information for one track.

Parameters:

Note that Solo and Mute only work on Audio Tracks. On tracks other than Audio Tracks, nothing is changed, there is no check, nor is there an error message, there is simply nothing done.

Examples:

If the track index is out of range, or otherwise invalid, the following occurs:

New Commands GetProjectInfo and SetProjectInfo:
Returns the chosen information about the tracks in the current project.

Parameters:

Examples:

SetProjectInfo:

Allows state of one parameter type on all of a project's tracks to be set.

The TrackSet parameter represents the setting for tracks numbering left to right, starting with 1, as in 12345...

The characters in the string represent enabling (1) disabling (0), or leaving alone (x) the parameter indicated by Type=ParamTracks for each channel.
 * '1' means that parameter is asserted in that track, for example, for MuteTracks, a 1 will mute that track.
 * '0' de-asserts it, for example for MuteTracks a 0 unmutes that track.
 * 'x' will leave the indicated track in its current state.

The string length is not required to match the number of channels in a project. If the string of 1s and 0s is shorter than the number of channels, then channels beyond the “reach” of the TrackSet string are untouched.

If the TrackSet string is longer than the number of channels in the project, then those characters in the string beyond the last track in the project are ignored.

No checking done for any mismatch between the TrackSet string length and the actual number of tracks in a session project. We could decide to return a condition flag indicating the mismatch as the TrackSet string being either too long or too short, if this is deemed important.

Parameters:

Examples: