Quicktime Scripting
Quicktime Scripting
- Subject: Quicktime Scripting
- From: c w <email@hidden>
- Date: Sun, 2 May 2004 16:39:50 +0100
Hi folks,
I am trying to do what Rob has suggested below. But it's not working:
I get an error from the Script Editor: "Expected end of line but found
identifier"
It seems to choke on the "for" in this line: save export settings for
QuickTime movie to outputFile with replacing
I have tried a bunch of variations, and in fact the script that you can
download from Apple: "Save Export Settings.scpt" gives an error. The
line in that script looks a little different:
set the target_file to choose file name with prompt "name & location
for the QT settings file:"
+event MVWRsxps; movie 1 with +class repl; given +class
expk;:+constant expkmpg4;, +class expd;:target_file
I am guessing that this is the appleevent for the same thing. That
gives me the message "Quicktime Player got an error. An error of type
-2107 has occurred"
I have looked all over the web, and can't see any references to either
of these error messages. So I am posting here. I am a bit of a
newbie so please go easy on me if I am missing something obvious. But
is someone can try the Apple script and let me know if it works, I
would be grateful! Here is the entire text of that script:
Chris
tell application "QuickTime Player"
activate
try
if not (exists movie 1) then error "No movies are open."
stop every movie
-- CHECK FOR THE CORRECT VERSION OF QUICKTIME
set the QT_version to (the QuickTime version as string)
set the player_version to (the version as string)
set the required_version to "6.3"
if (the QT_version is less than the required_version) or ,
(the player_version is less than the required_version) then
set the error_message to "This script requires QuickTime " & the
required_version & " or greater." & ,
return & return & ,
"Current QuickTime Version: " & QT_version & return & ,
"Current QuickTime Player Version: " & player_version
my upgrade_QT(error_message)
end if
-- CHECK FOR QUICKTIME PRO
if QuickTime Pro installed is false then
set the error_message to "This script requires a QuickTime Pro
installation on this system."
my upgrade_QT(error_message)
end if
set the target_file to choose file name with prompt "name & location
for the QT settings file:"
+event MVWRsxps; movie 1 with +class repl; given +class
expk;:+constant expkmpg4;, +class expd;:target_file
on error error_message number error_number
if the error_number is not -128 then
beep
display dialog error_message buttons {"Cancel"} default button 1
end if
end try
end tell
on upgrade_QT(passed_message)
tell application "QuickTime Player"
activate
stop every movie
set the target_URL to "
http://www.apple.com/quicktime/download/"
display dialog passed_message & return & return & ,
"If this computer is currently connected to the Internet, " & ,
"click the Upgrade button to visit the QuickTime Website." buttons
{"Upgrade", "Cancel"} default button 2
ignoring application responses
tell application "Finder"
open location target_URL
end tell
end ignoring
error number -128
end tell
end upgrade_QT
The Other Rob wrote:
>I'm looking for a way to export Quicktime movies with specific
settings
>using Applescript. I realise that you can export movies using the
default
>export setting presets within Quicktime, but none of these presets
meet my
>requirements. Are there any other options for exporting with custom
>settings?
You can use the optional "using settings" parameter of the export
command, settings being a file with some export settings. You can
export
settings with "save export settings".
here is a quick (and dirty) example :
tell application "Finder"
set outputFile to (make file at desktop with properties
{name:"my_settings.qtes"}) as alias
end tell
tell application "QuickTime Player"
tell movie 1
save export settings for QuickTime movie to outputFile with replacing
end tell
end tell
It's all in the QTplayer dictionary, check it out.
Ian
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.