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.
The Extra menu provides access to additional Commands that are not available in the normal default Audacity menusThe Help Menu lets you find out more about the Audacity application and how to use it.  It also includes some diagnostic tools.Extra commands related to play and recordExtra commands to select the toolExtra commands related to volumeExtra commands related to editingExtra commands related to play at speedExtra commands related to seekingExtra commands related to selecting a deviceExtra commands related to selectingExtra commands to set focus, usually focus on one trackExtra commands to move the cursorExtra commands to operate on a track that has focusThese commands were originally written for scripting Audacity, e.g via a Python script that use mod-script-pipeLike Scriptables I, but these ones are less commonly used from the menuToggle full screen mode with no title barSelects audioSets properties for a track or channel (or both)Gets information in a list in one of three formats.  Commands+ does not yet work, but is intended to include menu commands.Used in testing.  Sends the Text string back to you.This is an extract from GetInfo Commands, with just one command.Imports from a file.  The automation command uses a text box to get the file name rather than a normal file-open dialog.Exports to a fileOpens a project.Saves a project.Experimental command (called Drag in scripting) that moves the mouseCompares selected range on two tracks.  Reports on the differences and similarities.A version of Tools -> Screenshot with a more minimal GUIThe MenusExtra-Scriptables IIMenu.png
Click for details
Click on the image to learn more


 



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")
Bulb icon 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.
Commands+ does not yet work, but is intended to include menu commands too.


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 filename extension).


Export  

Export2old.png

Exports to a file. When using Export2 you have to give the full file name (including path and filename 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.

Warning icon 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 filename. If you give a filename, Audacity will use that.