1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 07:39:42 +02:00
audacity/scripts/piped-work/docimages_oddments.py
James Crook fa49d94530 Script work
Add Envelope script
Add Clips and Boundaries Scripts.
Add docimages_oddments.py for the weirder cases.
Add make html script.
Add more spectral images
Add Dark versions of spectrograms (paul's comment)
Clean up oddments script.

- This commit also adds an option NOT to bring Audacity to the top when screenshotting.
-- That's because QuickPlay will disappear if you do -because you lose mouse capture.
- Also allow negative window IDs in the drag command.

- Registration names of align commands sorted.  They had &, : and / in them.
- Fixed bug in SetTrackInfo where bFocused was being ignored
- Fixed bug where command manager ignored multi-commands.
- Commit docimages_oddments.py again, to fix line endings.
2018-02-24 14:20:29 -05:00

51 lines
1.8 KiB
Python

# docimages_oddments.py
# Sends commands to get images for the manual.
# Image oddments that don't fit the other categories.
# Make sure Audacity is running first and that mod-script-pipe is enabled
# before running this script.
# Historically this file has had peculiar problems with line endings.
#load and run the common core.
exec( open("docimages_core.py" ).read() )
import time
def oddments_imagesA():
for name in ["Select","Envelope","Draw","Zoom","TimeShift","Multi"] :
do( name + "Tool" )
capture( name + "Tool.png" , 'Tools' );
#A track is needed for the buttons to be active.
loadMonoTracks(1)
do( 'SetPreference: Name="/GUI/Theme" Value="high-contrast"')
for id in range( 11000, 11006 ):
do( "Drag: Id="+str( id) + " FromX=10 FromY=10" )
capture( "Button" + str(id) +"Hover.png", "Transport" )
do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" )
for id in range( 11200, 11206 ):
do( "Drag: Id="+str( id) + " FromX=10 FromY=10" )
capture( "Button" + str(id) +"Hover.png", "Tools" )
do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" )
for id in range( 11300, 11312 ):
do( "Drag: Id="+str( id) + " FromX=10 FromY=10" )
capture( "Button" + str(id) +"Hover.png", "Edit" )
do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" )
do( 'SetPreference: Name="/GUI/Theme" Value="light"')
def oddments_imagesB():
loadMonoTracks(1)
#Bring window to top now
capture( "Dummy.png", "Ruler" )
#We hope nothing else gets focus before the next capture, so
#that we actually get to see something!
do( "Drag: Window=Timeline FromX=200 FromY=10 ToX=600 ToY=10" )
time.sleep(3.0)
#Disable bringing to top, so as not to destroy quick play.
capture( "QuikPlay001.png", "First_Track_Plus ToTop=0" )
oddments_imagesA()
oddments_imagesB()