• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why does my script open QT in classic? path problems?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does my script open QT in classic? path problems?


  • Subject: Why does my script open QT in classic? path problems?
  • From: Scott Schrader <email@hidden>
  • Date: Sat, 08 Jun 2002 18:46:40 -0700

The script below is forcing QT to open within classic which could be the problem with the path (deduction of problem derived from m1.mov not opening), but when the script brings up a dialog box for me to choose, it's creating the path from my choice correct? Below the script is the event log. The boldend text is what Script Editor highlights.

-- replace with whatever movie names you have, but the order is important
set theMovies to {"m1.mov", "m2.mov", "m3.mov"}
set theFolder to ((choose folder) as string) -- or replace with path to your folder

set layout to 1 -- this means "horizontal"
set layout to 2 -- this means "vertical" -- comment this out for horizontal layout

set gap to 4 -- gap between tracks

tell application "QuickTime Player"
activate
set m to (make new movie) -- this will be our output file
set posOffset to 0 -- starting position

repeat with mov in theMovies -- run through all the movies
set thisMoviePath to theFolder & (mov as string) -- create the path

tell (open thisMoviePath) -- Open each movie and tell it at the same time
set thisMoviePos to (item layout of (get dimensions))
select all
copy
close
end tell

tell m
set tc to (count tracks)

if tc is 0 then
paste -- creates a new track
else
add with scaled
end if

tell track (tc + 1) -- this should refer to the new track
set pos to (get position)
set hPos to ((item 1 of pos) as integer)
set vPos to ((item 2 of pos) as integer)

if layout = 1 then -- "horizontal"

set newHpos to hPos + posOffset
set position to {newHpos, vPos}

else if layout = 2 then -- "vertical"

set newVpos to vPos + posOffset
set position to {hPos, newVpos}

end if

set dim to (get dimensions)
set trackSize to ((item layout of dim) as integer)
set posOffset to posOffset + gap + trackSize

end tell
log posOffset
end tell

end repeat

tell m
log position of tracks
return
-- prompt for save location...
save in (choose file name) as self contained
close
end tell

end tell
Event Log:
tell current application
choose folder
--> alias "100G:Media:Automation Example:compositing:"
end tell
tell application "QuickTime Player"
activate
activate
make new movie
--> document "Untitled 1"
open "100G:Media:Automation Example:compositing:m1.mov"
--> current application
--> No result was returned from some part of this expression.


Here is a little test script below:

tell application "QuickTime Player"
set test to (open "100G:Media:Automation Example:compositing:m1.mov")
end tell

Here is the log: tell application "QuickTime Player"
open "100G:Media:Automation Example:compositing:m1.mov"
--> current application
end tell

The script won't do a thing except create this log.


--

Regards,

Scott Schrader
Video Integrations
_______________________________________________
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.

  • Prev by Date: Re: "Show Controls" palette in Script Debugger
  • Next by Date: Converting 50 .mov files to .mp3
  • Previous by thread: Re: "Show Controls" palette in Script Debugger
  • Next by thread: Converting 50 .mov files to .mp3
  • Index(es):
    • Date
    • Thread