Need Help Fixing a clip search script in 2024.10.2
I have a function in a script that has stopped functioning in PT 2024.10.2.
The script takes a pre-built count down leader and copies it to a given location on a session time line.
I saw the note about the 'Clip List' window changing to 'Show Options Menu' but I think the issue is deeper than that.
Here is the old function (snipit of script):
'''
function copyClipToPlayHead(name) {
//Clear Find Clips
sf.keyboard.press({ keys: "cmd+shift+d", });
//Open "Find clips" window
sf.ui.proTools.mainWindow.popupButtons.whoseTitle.is('Clip List').first.popupMenuSelect({
menuPath: ["Find..."],
});
const findClipsWindow = sf.ui.proTools.windows.whoseTitle.is('Find Clips').first;
//Wait for "Find Clips" window
findClipsWindow.elementWaitFor();
//Enable "By Name" checkbox
findClipsWindow.checkBoxes.whoseTitle.is('By name').first.checkboxSet({
targetValue: "Enable",
});
//Enter text into "By Name" field
findClipsWindow.textFields.whoseTitle.is('').first.elementSetTextFieldWithAreaValue({
value: name,
});
//Click OK
findClipsWindow.buttons.whoseTitle.is('OK').first.elementClick();
//Wait for "Find Clips" window to disappear
findClipsWindow.elementWaitFor({
waitForNoElement: true
});
//Select All matching clips
sf.ui.proTools.mainWindow.popupButtons.whoseTitle.is('Clip List').first.popupMenuSelect({
menuPath: ["Select", "All"],
targetValue: "Enable",
});
const firstClipListRow = sf.ui.proTools.mainWindow.clipListView.childrenByRole("AXRow").first;
//Select matching clips in Edit Window.
firstClipListRow.children.allItems[1].children.first.popupMenuSelect({
isRightClick: true,
menuPath: ['Object Select in Edit Window'],
onError: "Continue",
});
//Copy selected clip
sf.ui.proTools.menuClick({ menuPath: ["Edit", "Copy"], });
sf.wait({ intervalMs: 200, });
//Goto Temp Marker 1
sf.ui.proTools.memoryLocationsTempGoto({ tempNumber: 1, });
//Nudge Back
sf.keyboard.press({ keys: "numpad minus", });
//Paste
sf.ui.proTools.menuClick({ menuPath: ["Edit", "Paste"], });
//Clear Find Clips
sf.keyboard.press({ keys: "cmd+shift+d", });
//Extend Selection
sf.keyboard.press({ keys: "shift+tab", });
//Grouo Clips
sf.ui.proTools.menuClick({ menuPath: ["Clip", "Group"], });
//Copy
sf.ui.proTools.menuClick({ menuPath: ["Edit", "Copy"], });
}
'''
My issue that that the 'Find Clips' window/option is gone.
I can use the keyboard command (sf.keyboard.press({ keys: "cmd+shift+f", }) to brute-force it, but that isn't really the soundflow way.
I think if I could get the sf.ui name for the find clip text box, I could probably figure the rest of this out.
Thanks,
Randall
- Kitch Membery @Kitch2025-01-15 20:22:26.546Z
I created a thread in early December with a script for Setting and clearing the new Clips List in Pro Tools.
Let me know if this addresses your issue. :-)
- RRandall Smith @Randall_Smith
Wonderful. I was able to find that. I will give that a shot and report back if I am still having issues.
-Randall