A possibly useful script

Discuss Max, an open source CD audio extractor and audio converter.
Post Reply
mattn
Posts: 152
Joined: Tue Sep 02, 2008 4:21 am

A possibly useful script

Post by mattn » Sat Feb 25, 2012 7:19 pm

Here's a script I just wrote that automates an annoying procedure in Max. Let's say you've opened a bunch of CUE files in Max and now you want to convert all tracks of all the cue files. Click Select All, click Convert, close the window. Click Select All, click Convert, close the window. Ad nauseam...

This script does it for you:

Code: Select all

tell application "Max"
	activate
	get name of every window whose visible is true and its name is not "Encoder"
	repeat with aName in result
		delay 0.5
		tell application "System Events"
			tell process "Max"
				tell window aName to perform action "AXRaise"
				delay 0.5
				tell window aName
					click button "Select All"
				end tell
				delay 0.5
				tell menu bar item "Tools" of menu bar 1
					click menu item "Convert Selected Tracks" of menu 1
				end tell
				delay 0.5
			end tell
		end tell
		close window aName
	end repeat
end tell

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests