[TxMt] Re: How does the QuickTime embed thing work?
Walter Lee Davis
waltd at wdstudio.com
Fri Jan 21 17:48:10 UTC 2011
That's cool, thanks to both of you. I haven't used AppleScript in a
very long time, can anyone recommend a way to write this so that it
would try QuickTime Player 7 syntax first, and then step down to
QuickTime Player X if it didn't find it?
Walter
On Jan 21, 2011, at 12:35 PM, Christian Eager wrote:
> Dru beat me to it, so all I'll do is confirm his suggestions, with
> one small change:
>
> set w to item 1 of (get natural dimensions of document 1)
> set h to item 2 of (get natural dimensions of document 1)
>
> ("movie" doesn't seem to be a valid class anymore—it's just
> "document").
>
> On Fri, Jan 21, 2011 at 12:29 PM, Dru Kepple
> <dru at summitprojects.com> wrote:
> On Jan 21, 2011, at 8:56 AM, Walter Lee Davis wrote:
>
> > Bump --
>
> > On Jan 18, 2011, at 11:17 AM, Walter Lee Davis wrote:
> >
> >> Now [...] I get a cryptic error
> >> pasted into the current document instead of my code.
>
> First, please provide the error. That's going to be most helpful
> for other people to trying to help.
>
> >>
> >> How is this supposed to work, so I can understand where to start
> >> poking around?
>
> Not sure, but what that is is a drag command. Open up the Bundle
> Editor (Control-Option-Command-B, or Bundles > Bundle Editor > Show
> Bundle Editor). Then choose "Drag Commands" from the pop up menu in
> the top left. Then open up the HTML section in the bar on the
> left. Look for the "Insert QuickTime Movie" command.
>
> >> Does it rely on QuickTime 7 Pro being installed?
> >>
> I'm not the best one to provide information on drag commands, or on
> this particular one, but the code for the command I have installed
> (should be the one that came with TM) seems to rely on AppleScript,
> which actually then uses Quicktime Player to get the dimensions of
> the dropped movie.
>
> The obvious thing to me is that if Snow Leopard broke this, then
> maybe it's a difference in the AppleScript dictionaries for
> QuickTime Player 7 and the new QuickTime Player (X).
>
> Just a guess...app "QuickTime Player" will refer to QT X on Snow
> Leopard, but was probably intended for what is now called QT 7 when
> it was written. Looking at the AppleScript being sent, the command
> is getting the dimensions of the movie. This is a valid movie
> property in QuickTime 7, but not in QuickTime X (I'm looking at the
> dictionaries in AppleScript Editor). QT X has a "natural
> dimensions" property, though, which seems like the same thing.
>
> So, in theory, we can change this:
>
> set w to item 1 of (get dimensions of movie 1)
> set h to item 2 of (get dimensions of movie 1)
>
> to this:
>
> set w to item 1 of (get natural dimensions of movie 1)
> set h to item 2 of (get natural dimensions of movie 1)
>
> Or, if you have QT 7 installed (personally, I still like it better),
> you can change this:
>
> tell app "QuickTime Player"
>
> to this:
>
> tell app "QuickTime Player 7"
>
> Haven't actually tried any of these suggestions, just conjecture,
> but if it doesn't work, maybe that gets you pointed in the right
> direction.
>
> +dru
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
More information about the textmate
mailing list