- Joined
- Apr 30, 2006
- Messages
- 2
- Reaction score
- 0
Dear Forum!
I'm working on an AppleScript droplet to take a series of mp3 files that I have and convert them all to Hinted Movie format using QuickTime Pro. The code as I have it works fine now, but it is not perfect. I'm hoping somebody could help me with two things:
(here's my code, to begin with)
Open this Scriplet in your Editor:
on open of movs
set sl to ((choose folder with prompt "Save hinted movies to:") as text)
tell application "QuickTime Player"
activate
repeat with i from 1 to number of items in movs
set this_item to item i of movs
open this_item
set save_location to sl & (get name of movie 1) & ".mov"
export movie 1 to save_location as hinted movie using default settings
close movie 1 saving no
end repeat
end tell
end open
As a droplet, I would like to be able to drop several files on it at once and not have to specify the save location. I have experimented with getting the path of the dropped file, and using that as a jumping off point to extract just the component folder, but it gives me an error when I need to convert it to text.
Also, it doesn't return the exact file name that I want.
For example, if i'm dropping
1_2_Committee_Talks.mp3
ideally, i would like to have 1_2_Committe_Talks.mov returned to me in the same folder. But as the script works right now, it would just return "Committe Talks.mov"
If you have any suggestions please help! Thanks.
I'm working on an AppleScript droplet to take a series of mp3 files that I have and convert them all to Hinted Movie format using QuickTime Pro. The code as I have it works fine now, but it is not perfect. I'm hoping somebody could help me with two things:
(here's my code, to begin with)
Open this Scriplet in your Editor:
on open of movs
set sl to ((choose folder with prompt "Save hinted movies to:") as text)
tell application "QuickTime Player"
activate
repeat with i from 1 to number of items in movs
set this_item to item i of movs
open this_item
set save_location to sl & (get name of movie 1) & ".mov"
export movie 1 to save_location as hinted movie using default settings
close movie 1 saving no
end repeat
end tell
end open
As a droplet, I would like to be able to drop several files on it at once and not have to specify the save location. I have experimented with getting the path of the dropped file, and using that as a jumping off point to extract just the component folder, but it gives me an error when I need to convert it to text.
Also, it doesn't return the exact file name that I want.
For example, if i'm dropping
1_2_Committee_Talks.mp3
ideally, i would like to have 1_2_Committe_Talks.mov returned to me in the same folder. But as the script works right now, it would just return "Committe Talks.mov"
If you have any suggestions please help! Thanks.