Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
Topic: Video Dimensions to Comments script help needed
|
|
#1
|
||
|
Freshman Lounger
Join Date: May 2006
Posts: 7
|
Hi everybody,
I want to include the "Video Dimensions" information in a visible column of my video collection. Like this: ![]() Even though it will be horrendous work to set one by one manually. This looks like a task for an Apple Script for iTunes. I would like to have one that makes this job for me. An Apple Script that writes the "Video Dimensions" information automatically into the "Comments" space and if something else is previously there, that "Video Dimensions" would be added and placed at the beginning. From here to there: ![]() So: Could somebody please tell me where to find it, if it's already been made? if not, how to write it, if there is a tutorial for neophytes somewhere out there? if not, how to modify one like "FileCreationToComment" script as it was made in the following thread "Need a script: "Last Listened Date" to "Text box" ? or the best, can be generously written and posted by one of the Black Belts that hang around here? Thank a lot, MacDream Last edited by MacDream; 07-06-2008 at 03:55 PM. |
||
|
|
|
Join the iLounge Community and the ad above will disappear.
|
|
#2
|
||
|
Veteran Lounger
Join Date: Oct 2006
Location: About 3 feet in front of the monitor
Posts: 4,878
|
There's got to be a better way of doing this....
iTunes' Applescript dictionary has no awareness of movie dimensions, so there's no quick way to get the info you want. And Image Events only reads still images, so it's of no help. That pretty much exhausts my meager knowledge;-) (There's p'bly some hook in QuickTime that iTunes calls to get that info, but I've got no idea what it might be...maybe the folks at macscripting.net have a QT guru hanging around, or check with some QT groups....) That said, this worked OK in the one simple test I gave it. It requires the QuickTime Player to open each movie file in a player window, then it grabs the dimensions, then it closes the player window/file; iTunes adds the dimensions to whatever info already exists in the track's Comments box. This script is an accident waiting to happen -- drunk drivers do more error checking than this thing -- so treat it nicely (like, make sure you only select video files. Missing files will p'bly make it puke spectacular colors. Etc. ;-). Oh yeah -- don't have the iTunes display sorted by Comments! Select a few files, activate the script, wait for a bit. Code:
-- Movie Dimensions to Comments script
tell application "iTunes"
set sel to the selection
if sel is {} then display dialog "Please select something" buttons {"Cancel"}
repeat with i from 1 to count of sel
set the_track to item i of sel
set the_alias to location of the_track as alias
tell application "QuickTime Player"
open the_alias
set dims to dimensions of document 1 as list
set width to item 1 of dims
set height to item 2 of dims
close document 1 saving no
end tell
set comments to comment of the_track
set comment of the_track to (width & "x" & height & return & comments) as string
end repeat
end tell
|
||
|
|
|
|
|
#3
|
||
|
Freshman Lounger
Join Date: May 2006
Posts: 7
|
Dear S2_Mac,
This is more than I expected. Your knowledge isn't meager at all! It works like charm. I'll be careful to treat it as you recommended. I also have to thanks the extension of your post. You have provided me with the information I need to understand and run this script. Furthermore, you have made time to write the script for me. My little knowledge allowed me to compile it and install it. Thanks for your offer in this regard too. I hope bad weather goes away over there soon. For anyone else interested in this iTunes Script, can find it here: Movie Dimensions to Comments WARNING:
Demo P.S.: I'm looking for a better (for free) place to host this script. Any suggestion? Thanks. Last edited by MacDream; 07-07-2008 at 10:06 AM. |
||
|
|
|
|
|
#4
|
||
|
Freshman Lounger
Join Date: Jan 2013
Posts: 1
|
Will this script work with iTunes 11? I can't seem to access the link you provided. Could you upload it again please?
Thanks! |
||
|
|
|
|
|
#5
|
||
|
Freshman Lounger
Join Date: May 2006
Posts: 7
|
I'm not using iTunes 11 until I can.
I'm using iTunes 10.7 and the script still works find, but since QT change to 10, I had to make a little change in the script and (keep) iTunes 7 in my application folder. You have to check your inbox for links and examples because this crap site wont allow me to post links or images. Give it a try in iTunes 11 with a test movie. Good luck! |
||
|
|
|
Topic: Video Dimensions to Comments script help needed
Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
View iLounge History. Read our old Forums Archive (2001-2003)
All times are GMT -4. The time now is 10:24 AM.
All times are GMT -4. The time now is 10:24 AM.













Linear Mode


