hi all, I’m trying to achieve a side-by-side review of 2 or more videos using either VLC or QT.
The files can have random filename and are within the same folder as the script. For some reason I keep getting errors. Scripts I’ve tried are below…can anyone tell me what I’m doing wrong?
– Get the list of movie files in the same folder as the script
set scriptPath to path to me
set folderPath to (container of scriptPath) as text
set movieFiles to paragraphs of (do shell script "ls " & quoted form of POSIX path of folderPath & “/*.mp4”)
– Check if there are at least two movie files
if (count movieFiles) < 2 then
display dialog “There are not enough movie files in the folder.” buttons {“OK”} default button “OK”
return
end if
– Open QuickTime Player
tell application “QuickTime Player”
activate
-- Open the first movie file
set firstMovie to open item 1 of movieFiles
-- Open the second movie file
set secondMovie to open item 2 of movieFiles
-- Set the layout to side by side
set layout of document 1 to side by side
set layout of document 2 to side by side
-- Mute the sound for both movies
set volume of document 1 to 0
set volume of document 2 to 0
-- Start looping for both movies
set looping of document 1 to true
set looping of document 2 to true
end tell