Extra Menu: Scriptables II

From Audacity Development Manual
Jump to: navigation, search
The Extra > Scriptables II menu provides commands typically used in scripting, for example via Macros or Python.
Extra-Scriptables IIMenu.png


These commands were originally written for scripting Audacity, e.g via a Python script that uses mod-script-pipe. The commands though are also present in the menu, available from Macros, and available from within Nyquist using (aud-do "command")
Tip Many of these commands have optional values.
  • Where the dialog shows a checkbox 'Set', leaving the box unticked leaves the corresponding value unchanged.
  • When using the same command in scripting, leaving the value out entirely has the same effect.


Select  

Select.png

Selects audio. See the corresponding discussion on the Scriptables I page for what the various fields do.

Set Track 

Set Track.png

Sets values for selected tracks. See the corresponding discussion on the Scriptables I page for what the various fields do.


Get Info  

Get Info.png

Gets information in a list in one of three formats.


Message  

Message.png

Used in testing. Sends the Text string back to you.


Help  

Help.png

This is an extract from GetInfo Commands, with just one command.


Import  

Import2.png

Imports from an audio file. The automation command uses a text box to get the file name rather than a normal file-open dialog.

You have to give the full file name (including path and file name extension).


Export  

Export2old.png

Exports to a file. When using Export2 you have to give the full file name (including path and file name extension).

  • File Name: file name.
  • Number of Channels: 1 for mono, 2 for stereo.


Open Project  

Open Project2.png

Opens an Audacity project.


Save Project  

Save Project2.png

Saves an Audacity project.

Move Mouse  

Drag.png

Experimental command (called Drag in scripting) that moves the mouse.
An Id can be used to move the mouse into a button to get the hover effect.
Window names can be used instead of Ids.
If To is specified, the command does a drag, otherwise just a hover.

Advice This IS an experimental command, and it is tricky to use effectively. It is best to look at example scripts to see how it can be used.

Compare Audio  

Compare Audio.png

Compares selected range on two tracks. Reports on the differences and similarities.


Screenshot (short format)  

Screenshot.png

A version of Help > Screenshot with a more minimal GUI. One of the most useful options is All_Tracks.
The _Plus suffix includes the timeline.


If you give a path, Audacity will provide a default file name. If you give a file name, Audacity will use that.