2

I need a quick and easy way to find the frame rate of a video in applescript. So far grabbing it through QuickTime Player's inspector seems like the easiest option.

tell application "QuickTime Player"
    activate
    set the_movie to choose file
    open the_movie
    delay 1
    if not (document 1 exists) then return beep 1
    tell application "System Events" to tell process "QuickTime Player"
        if not ((window 1 whose name ends with "Inspector") exists) then
            keystroke "i" using {command down} -- “Show Movie Inspector” menu   command
        end if
        set theInspector to window 1 whose name ends with "Inspector"
        set {X, Y} to position of static text 1 of theInspector whose value is "FPS:"
        set theFrameRate to value of text area 1 of theInspector whose position is {X + 120, Y}
    end tell
end tell

display dialog theFrameRate

I found this code on the internet, but it cant seem to locate the inspector's text area. Can anyone help me out? I'm running el capitan

You must log in to answer this question.

Browse other questions tagged .