I have always been able to drag and drop a QuickTime movie into an HTML page and the requisite object/embed/ActiveX tag structure is automagically built. Now, on my new MacBook Pro Snow Leopard, in a user account I built using the Apple Migration Assistant from a Leopard MacBook Pro, this no longer works. I get a cryptic error pasted into the current document instead of my code.
How is this supposed to work, so I can understand where to start poking around? Does it rely on QuickTime 7 Pro being installed?
Thanks in advance,
Walter
Bump -- can anyone comment about this feature? I don't use it often, but when I do, it's really handy. I don't want to upgrade my other Mac to Snow Leopard until I sort this.
Thanks,
Walter
On Jan 18, 2011, at 11:17 AM, Walter Lee Davis wrote:
I have always been able to drag and drop a QuickTime movie into an HTML page and the requisite object/embed/ActiveX tag structure is automagically built. Now, on my new MacBook Pro Snow Leopard, in a user account I built using the Apple Migration Assistant from a Leopard MacBook Pro, this no longer works. I get a cryptic error pasted into the current document instead of my code.
How is this supposed to work, so I can understand where to start poking around? Does it rely on QuickTime 7 Pro being installed?
Thanks in advance,
Walter
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
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
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@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@lists.macromates.com http://lists.macromates.com/listinfo/textmate
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@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@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Jan 21, 2011, at 9:48 AM, Walter Lee Davis wrote:
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
I found this snippet:
try tell application "Finder" return name of application file id "com.macromates.TextMate" end tell on error err_msg number err_num return null end try
You'd have to get the appropriate application id for the various QuickTimes, but looks like it would work. Found here:
http://www.mikepilat.com/blog/2010/04/determining-if-an-application-is-insta...
Also, Daring Fireball has some related info on determining if an application is running without writing 'if application "whatever" is running'. If you're going to retool the script to use either or, might also be cool to see if you can work out the logic to make use of which app is currently running if both are installed.
http://daringfireball.net/2006/10/how_to_tell_if_an_app_is_running
+dru
I opened a new HTML document, dragged a .mov file into it and this is what I got:
============================= 146:147: syntax error: Expected “,” but found number. (-2741) <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"> <param name="src" value="betterresults_848x496.mov"> <param name="controller" value="true"> <param name="autoplay" value="true"> <embed src="betterresults_848x496.mov"
controller="true" autoplay="true" scale="tofit" cache="true" pluginspage="http://www.apple.com/quicktime/download/" > </object> =============================
So, there are the object/embed tags, but an error message as well... TextMate 1.5.10 (1623), Mac OS X 10.6.6, no QT pro.
Kind regards, Tobias Jung
Walter Lee Davis wrote (Fri, 21 Jan 2011 11:56:33 -0500):
Bump -- can anyone comment about this feature? I don't use it often, but when I do, it's really handy. I don't want to upgrade my other Mac to Snow Leopard until I sort this.
Thanks,
Walter
On Jan 18, 2011, at 11:17 AM, Walter Lee Davis wrote:
I have always been able to drag and drop a QuickTime movie into an HTML page and the requisite object/embed/ActiveX tag structure is automagically built. Now, on my new MacBook Pro Snow Leopard, in a user account I built using the Apple Migration Assistant from a Leopard MacBook Pro, this no longer works. I get a cryptic error pasted into the current document instead of my code.
How is this supposed to work, so I can understand where to start poking around? Does it rely on QuickTime 7 Pro being installed?