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