i’m trying to script an application, mpeg streamclip, to batch process video files from
a camera to make them more editing friendly. mpeg streamclip, however, is not
applescript aware. i’ve gotten help elsewhere and have gotten to a certain point but
came here to try to get past an impasse.
i can open the app, open the batch window, open the load files window, and
navigate to the drive containing the video. once there, though, i don’t know how to
burrow down into a series of folders to get to the video.
here is the code so far:
tell application "MPEG Streamclip"
activate
end tell
tell application "System Events"
tell process "MPEG Streamclip"
keystroke "b" using {command down}
delay 1.5
keystroke return
delay 1.5
tell window "MPEG Streamclip - Batch List"
click button "Add Files."
end tell
tell window "Open Files"
-- sidebar is in group 2
tell group 2
tell splitter group 1
tell scroll area 1
tell outline 1
-- this may select the wrong item if there are two items with the same name
set driveRow to item 1 of (every row whose (value of static text 1) is "DriveName")
select driveRow
end tell
end tell
end tell
end tell
end tell
delay 1.5
tw, user on another forum, helped me get this far. i’m using uielementinspector to get
information about window elements. it does not display things like the group number
so i don’t know how tw came up with group 2 for the left pane of the ‘open files’ window.
i also don’t know, once i get into my drive, how to get to the folder, several layers deep,
that i’m looking for. for what it’s worth, the drive and folder structure is always the same.
my thinking now is that i could follow the above code with a repeat of the ‘tell window “Open Files”’
routine, switching to the main navigation pane containing the folders, and adding additional
groups, rows, etc, as necessary. i thought i could repeat this several times until i get down
to the folder i need. don’t really see how to do this, though, without knowing group and
other numbering info.
maybe there’s a better way?
just for info, i’m trying to make this script to help someone i work with who has a disability
that makes this kind of navigation and processing pretty much impossible. if i can get
through this, i can get him something he can just click on on the desktop and have the
script handle everything. that’s the aim, anyway. any further suggestions most appreciated.
thanks,
BabaG