A Better Reveal Selected Clips In Finder
By Matt Friedman @Matt_Friedman
While trying to use the built in Reveal Clip in Finder script, it wasn't working - it gets stuck in that Clip Rename - Clip Info window.
I came up with this modern, simpler version that I think has even better functionality.
This can reveal multiple selected clips, from the timeline and/or the cliplist, even if the files are spread out amongst multiple locations/drives/folders.
It can also be run from anywhere, so long as Pro Tools is running (in the fore or background)
if (!sf.ui.proTools.isRunning) throw `Pro Tools is not running`;
function main() {
const files = sf.app.proTools
.getFileLocation({ fileFilters: ["SelectedClipsTimeline", "SelectedClipsClipsList"] })
.fileLocations
.filter(f => f.isOnline)
.map(f => f.path);
if (files.length === 0) {
log(`Could not locate any clip(s)`);
return;
}
sf.system.execAppleScript({
script: `
tell application "Finder"
activate
reveal {${files.map(f => `POSIX file "${f}" as alias`).join(", ")}}
end tell
`
}, `A clip was no longer at the expected Finder location.`);
}
main();
- PPhilipp Wilfinger @Philipp_Wilfinger
Thank you very much - exactly what I was looking for!