MACSCRPT Archives

May 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Simon Dorfman <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 19 May 2006 08:42:11 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (63 lines)
Thanks to a quicktime export tutorial
[http://freevlog.org/index.php/2006/04/26/443/], I'm now able to export iPod
compatible videos using the dual-pass divx codec.  The problem is, it's a
time-consuming task so I thought I'd try to automate it with applescript. I
took a look at the QuickTime applescript dictionary and concluded that UI
scripting will be required.

Below is the script I started.  The problem I'm running into is a drop-down
menu that I can't seem to select.  I try selecting it with arrow keys, but
doing so doesn't update the menu below it.  It's not obvious it hasn't
updated until you click the Options button after running the script.  It
shows the options from the initial selection. Very strange.

Anyone have any ideas?

Many thanks in advance,
Simon 

In case this email wraps, I've put a plain-text version of the below script
online here: 
http://simondorfman.com/temp/qt_export.txt

activate application "QuickTime Player"
tell application "System Events"
        tell process "QuickTime Player"
                click menu item "Export..." of menu 1 of menu bar item
"File" of menu bar 1
                --click menu item "Movie to QuickTime Movie" of menu 1 of
pop up button 2 of UI element 1 of UI element 1 of UI element 9 of window
"Save exported file as..."
                --can't select "Movie to QuickTime Movie from "Export"
drop-down menu with the above command, so instead click on it and then
keystroke down to the bottom then up to it and press enter
                click pop up button 2 of UI element 1 of UI element 1 of UI
element 9 of window "Save exported file as..."
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 31) -- down arrow key
                keystroke (ASCII character 30) -- up arrow key
                keystroke (ASCII character 30) -- up arrow key
                keystroke (ASCII character 30) -- up arrow key
                keystroke (ASCII character 30) -- up arrow key
                keystroke (ASCII character 30) -- up arrow key
                keystroke return -- return key
                delay 1
        end tell 
end tell

ATOM RSS1 RSS2