Quicktime Version

I am trying to convert some old quicktime scripts to 10.6.8.

tell application "QuickTime Player 7"
	-- CHECK FOR THE CORRECT VERSION
	set QT_version to (QuickTime version as string)
	set player_version to (version as string)
	if (QT_version is less than "5.0") or ¬
		(player_version is less than "5.0") then
		error "This script requires QuickTime 5.0 or greater." & ¬
			return & return & ¬
			"Current QuickTime Version: " & QT_version & return & ¬
			"Current QuickTime Player Version: " & player_version
	end if
	
end tell

Quicktime version returned is 1800?
Cant find any reference to what this means to humans.

Suggestions for a better way to test versions.

Thanks in advance

Suggestions for a way to test

Perhaps something like:

tell application "QuickTime Player 7"
	set QT_version to version
	set saveTID to AppleScript's text item delimiters
	set AppleScript's text item delimiters to {"."}
	set QT_version to (text item 1 of QT_version) as integer
	set AppleScript's text item delimiters to saveTID
	if QT_version < 5 then
		
	end if
end tell

I have a theory that the major app component of QuickTime Player 7’s ‘version’ is always going to be “7”. :wink:

A way which still works to get the QuickTime version (as opposed to the player version) is:

tell ((system attribute "qtim") div 65536) to set QT_version to (it div 4096 * 10 + it mod 4096 div 256 as text) & "." & it mod 256 div 16 & "." & it mod 16

So you could do something like this:

tell ((system attribute "qtim") div 65536) to set QT_version to (it div 4096 * 10 + it mod 4096 div 256 as text) & "." & it mod 256 div 16 & "." & it mod 16

considering numeric strings
	if (QT_version < "5.0.0") then ¬
		error "This script requires QuickTime 5.0 or greater." & ¬
			return & return & ¬
			"Current QuickTime Version: " & QT_version
end considering

That’s about all you can bank on, it seems. OMM, QuickTime version returns 2826.19, QuickTime Player’s version as “7.6.6”, and system attribute “qtim” using your code as “7.7.3”.

it’s quite easy (current system version 10.9.4)

from /System/Library/QuickTime/QuickTimeComponents.component/Contents/version.plist


	<key>CFBundleShortVersionString</key>
	<string>7.7.3</string>
	<key>CFBundleVersion</key>
	<string>2826.19</string>

from /Applications/Utilities/QuickTime Player 7.app/Contents/version.plist


	<key>CFBundleShortVersionString</key>
	<string>7.6.6</string>
	<key>CFBundleVersion</key>
	<string>7.6.6</string>

Yep. Same here. These figures can all be seen if you open QuickTime Player 7 and go to QuickTime Player 7 → About QuickTime Player 7.

Excellent, Quick response.
THANKS Guys!