2

I'd like to be able to grab the metadata of the currently playing file in Quicktime X using ScriptingBridge and Ruby, so far I have the following code

require 'osx/cocoa'
OSX.require_framework 'ScriptingBridge'

@app = OSX::SBApplication.applicationWithBundleIdentifier("com.apple.QuickTimePlayerX")

@app.documents.each do |movie|
  # What now?!
end

But I can't find any functions in QuickTime X's applescript dictionary to get the metadata from a document object (the same data you can see in QT's 'Show Movie Inspector' HUD) — does anyone have any ideas?

JP.
  • 5,507
  • 15
  • 59
  • 100

2 Answers2

0

A quick inspection of objects can be done with the Looksee gem - tells you what methods are available on a ruby-object. I don't know if it will work properly with ScriptingBridge, but it's quick to try.

rud
  • 1,012
  • 8
  • 22
  • Unfortunately Scripting Bridge appears to work by passing the commands directly to the OS X cocoa framework via `method_missing` so looksee, pretty though it is, doesn't help out so much! Sorry! – JP. Aug 01 '10 at 14:43
0

What about if you download QuickTime Player 7 and use that instead? It wont replace QuickTime Player X and has many features that X does not (although you'll need a pro serial number to access some of the features from the GUI). Apple still make this version available for a good reason!

Alternatively, if you've got as far as writing some Obj-C code, you could go one step further and access the metadata directly, as illustrated here.

brennanyoung
  • 6,243
  • 3
  • 26
  • 44