Is it posssible to script the “Export for Web” function? I cannot find reference of it in the dictionary.
I have almost managed a “manual” method but do not know how to click the “Export” button - as follows:
try
activate application "QuickTime Player"
tell application "System Events"
tell process "QuickTime Player"
keystroke "E" using {command down}
click button "Export" of [b]THEOK/CANCELBUTTONS[/b]
end tell
end tell
Hi,
try this
activate application "QuickTime Player"
tell application "System Events"
tell process "QuickTime Player"
set frontWindow to window 1
keystroke "E" using command down
repeat until exists sheet 1 of frontWindow
delay 0.2
end repeat
click button "Export" of sheet 1 of frontWindow
end tell
end tell
Thanks so much Stefan,
Presuming that the “Export for web” must be scripted via System events I’ve taken some steps but need another assist with – enter myPath for file output
When running my script below - I get “System Events got an error: Can’t get menu 1 of pop up button 1 of sheet 1 of window “Movie5.mov” of application process “QuickTime Player”. Invalid index.”
Im fairly
property myPath : ":Users:blowupp:Folder:"
activate application "QuickTime Player"
tell application "System Events"
tell process "QuickTime Player"
set frontWindow to window 1
keystroke "E" using command down
repeat until exists sheet 1 of frontWindow
delay 0.2
end repeat
set value of text field 1 of sheet 1 of frontWindow to myName
-- enter myPath for file output
set value of menu item 3 of menu 1 of pop up button 1 of sheet 1 of frontWindow to myPath
--do shell script " sed \"s/Movie5/" & myName & "......
This is a bit complicated, in a non-english system the UI elements might be named differently
property myPath : "/Users/blowupp/Folder"
activate application "QuickTime Player"
tell application "System Events"
tell process "QuickTime Player"
set frontWindow to window 1
keystroke "E" using command down
repeat until exists sheet 1 of frontWindow
delay 0.2
end repeat
tell sheet 1 of frontWindow
set value of text field 1 to myName
tell pop up button 1
click
delay 0.2
pick menu item "Other..." of menu 1
end tell
end tell
repeat until exists window "Open"
delay 0.2
end repeat
keystroke "G" using command down
tell window "Open"
repeat until exists sheet 1
delay 0.2
end repeat
tell sheet 1
set value of text field 1 to myPath
click button "Go"
end tell
repeat while exists sheet 1
delay 0.2
end repeat
click button "Choose"
end tell
repeat while exists window "Open"
delay 0.2
end repeat
--do shell script " sed \"s/Movie5/" & myName & "......
end tell
end tell
Masterful stuff, thanks once again.