Greetings all!
I’ve been lurking around for a while. Finally, I have a good question to post.
I am Technical Manager at a college movie theater. Our pre-movie slide show uses an SMIL script to play slides, movies and video clips before the movie starts. It works out pretty well but the time has come for me to train somebody else to handle the pre-movie multimedia.
I put all the multimedia files into my “Shared” folder specially set aside for the purpose… (JPEG/TIFF pictures, MP3/AIFF music, MOV/MPEG/etc. movie files.) I tell the people who supply me with the media where to put them and the deadline for publication. They simply drop the files into the folder. Later on, I go into that folder, preview the files then write the script. It works out pretty well but the time has come for me to pass the torch. But the sad truth is that I have little chance of finding a Work Study student who knows how to hand-code an SMIL script. My solution is to write an AppleScript to do it auto-magically.
I have a script that does the job but it needs work. It’s rather long so I won’t put it into this message but, if you want to read it, Click HERE.
It’s a bit convoluted and pretty clunky but it has basic function. Simply put, my question is how to clean it up?
The script works like this:
- It asks for the location of the folder containing the multimedia files.
- It asks for the location of a template file that contains all the headers and region definitions that SMIL needs to get started.
- It reads in the list of all the filenames in the selected folder and builds the SMIL from the information contained therein.
My method is to code the file names so that the AppleScript knows what to do with them.
An example woud be:
01 B MyFileName reg 30.jpg
The first two digits determine the order the files play in. (The finder does this for me when it automatically alphebetizes the list.)
The next letter tells the script if there should be a “ – ” tag. (B=Begin a block. E=End a block.)
“MyFileName” is descriptive text.
“reg” is the screen region I want the picture or movie to play in.
The last two digits are the duration I want the file to play.
The script parses the file extension (“jpg”, “mp3”, etc.) to find out what type of media it is.
I’ve got a bunch of questions but, I’ll limit it to just this one for now…
Is there a better way to do this? Can AppleScript determine some information about a file without me having to code it into the file name?
T.I.A.!
Randy