Re: Similar path problem - please help!
Re: Similar path problem - please help!
- Subject: Re: Similar path problem - please help!
- From: JollyRoger <email@hidden>
- Date: Mon, 10 Jun 2002 20:41:34 -0500
On 6/10/2002 7:31 PM, "Scott Schrader" <email@hidden> wrote:
>
set mov to {"m1.mov", "m2.mov", "m3.mov"}
>
set theFolder to ((choose folder) as string) -- or replace with path to
>
your folder
>
tell application "QuickTime Player"
>
activate
>
set thisMoviePath to theFolder & (mov as string) -- create the path
>
>
tell (open thisMoviePath) -- Open each movie and tell it at the same
>
time
>
end tell
>
end tell
A few problems with your script:
You tell QuickTime Player to set thisMoviePath. You don't need to tell
QuickTime Player to do this - string manipulation like this is built into
the AppleScript language. Take this command out of the tell block.
You are setting thisMoviePath to theFolder & (mov as string), But mov is
not a string - it's a list of three strings. So the result is:
"some:path:here:m1.movm2.movm3.mov" - not what you intended, right?
Then you "open thisMoviePath", which is a text string at this point.
QuickTime Player is stupid - it can't convert a string to an alias on it's
own - so you should do "open (alias thisMoviePath) instead.
Also, the second tell block is empty. Why? Why are you trying to tell the
movie to begin with?
I think (if I understand what you are really trying to do) this is what you
want:
-- begin script
set movList to {"m1.mov", "m2.mov", "m3.mov"}
set movFolder to ((choose folder) as string) -- or replace with path to your
folder
repeat with nextMovName in movList
set nextMovPath to movFolder & nextMovName
tell application "QuickTime Player"
set mov to open (alias nextMovPath)
end tell
end repeat
-- end script
HTH
JR
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.