Scripting help - turn on Spectrogram display?

Hi all, I’'m using Mac OS 10.5, and I believe I used the zip.

I want to write a script that:

  • resizes a stereo track vertically and horizontally to fill the screen
  • changes it from ‘waveform’ to ‘spectrogram’ display mode
  • takes a screenshot
  • closes the track and moves to the next file in the folder

Unfortunately, I can’t find anything in the documentation about using a script to turn on the Spectrogram display mode. Is this possible?

What scripting language/system are you planning to use?

– Bill

Either AppleScript or the built-in Audacity one (the documentation seems to reference a built-in Audacity scripting language…). says: “The scripting module is an experimental GUI plug-in that allows Audacity to be driven from an external Perl script. Commands are sent to Audacity over a named pipe. Any scripting language that supports named pipes can be used in place of Perl.”

In order to activate it you have to compile Audacity yourself.

I’m no Applescript expert (by a long shot :frowning: ) but I seem to recall an AppleScript extension that will expose a program’s GUI so it can be scripted even if it does not have built-in support for AppleScript (which Audacity does not). Then it is a matter of whether or not the Track Drop-down Menu is exposed as a GUI element.

– Bill

Thanks, it seems you’re talking about UI Scripting:

The first link mentions UI Browser as a paid but free-for-30-days tool that might be useful for finding out how to script the drop-down box:

I’ll try it and report back.

(It also turns out that Mac OS X Automator has a “Watch Me Do” feature that might do the trick, I haven’t explored that at all.)