Hi, The sample movie script below returns the QuickTime version or a version list of QuickTimes installed in a PC as float-point number. [In the Message Window] put baVersion("qt3") -- "4.1.2" put xQuickTimeVersion() -- 4.1200 put xQuickTimeVersion(#list) -- [2.1259, 4.1200] -- [Movie script returning the version(s) of QuickTime] on xQuickTimeVersion sList -- Returns the version or a list of versions of installed QuickTime(s) -- Gets the versions of QuickTime nQT2 = xConvertToFloat(baVersion("qt")) nQT3 = xConvertToFloat(baVersion("qt3")) if sList = #list then -- With #list parameter given -- Appends the versions of QuickTimes to the list result = [] if nQT2 > 0 then result.append(nQT2) end if if (nQT3 > 0) and (nQT2 <> nQT3) then result.append(nQT3) end if else -- Without a parameter -- Gets the last version of installed QuickTime result = max(nQT2, nQT3) end if return result end on xConvertToFloat sNum -- Converts a version string to float sOrgDelimiter = the itemDelimiter -- Saves the current delimiter the itemDelimiter = "." -- Changes the item delimiter into "." if sNum.item.count > 1 then -- If decimal point exists -- Uses the first decimal point sResult = sNum.item[1..2] delete sNum.item[1..2] repeat while sNum <> empty sResult = sResult & sNum.item[1] delete sNum.item[1] end repeat else -- Without a decimal point sResult = sNum end if the itemDelimiter = sOrgDelimiter -- Resume the item delimiter return float(sResult) end _____ "Mark A. Boyd" wrote: > Note that baVersion() returns a string, so you would need to parse the > return into a usable value before making the comparison. Hmm, they seem to > return slightly different versions, too: > > -- Welcome to Director -- > put baVersion("qt3") > -- "4.1.2" > put quickTimeVersion() > -- 4.1800 Good luck, Fumio Nonaka Attain Corporation [EMAIL PROTECTED] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to