Title
Delete Memory Locations Script Broken - Pleas help fix!
What do you expect to happen when you run the script/macro?
This Script Delete's all markers on the timeline that start with the word Location. Since updating to Pro tools v23.12.0.136 it no longer works. I need help to update it to work again please?
Thanks
Are you seeing an error?
What happens when you run this script?
The memory Locations window does pop up for a split second then it closes. Before updating Pro tools it would stay open and the script deletes a marker starting with the word location one at a time, then it closes.
How were you running this script?
Other
How important is this issue to you?
5
Details
{ "inputExpected": "This Script Delete's all markers on the timeline that start with the word Location.\nSince updating to Pro tools v23.12.0.136 it no longer works.\nI need help to update it to work again please?\n\nThanks", "inputIsError": false, "inputWhatHappens": "The memory Locations window does pop up for a split second then it closes. Before updating Pro tools it would stay open and the script deletes a marker starting with the word location one at a time, then it closes.", "inputHowRun": { "key": "-MpfwoFyZNOpBC3X5xGI", "title": "Other" }, "inputImportance": 5, "inputTitle": "Delete Memory Locations Script Broken - Pleas help fix!" }
Source
function clearMemoryLocations(name) {
const isMemLocWinOpened = sf.ui.proTools.getMenuItem('Window', 'Memory Locations').isMenuChecked
// // Open mem loc win
sf.ui.proTools.memoryLocationsShowWindow()
// Get Memory Locations including...
const memoryLocations = sf.proTools.memoryLocationsFetch().collection['List'].filter(m => m.name.includes(name))
// Clear found
memoryLocations.forEach(memLoc => {
sf.ui.proTools.memoryLocationsGoto({ memoryLocationNumber: memLoc.number })
sf.ui.proTools.memoryLocationsWindow.popupButtons.first.popupMenuSelect({ menuPath: ['Clear*'], useWildcards: true });
});
// Set initial state of Mem Loc Win
if (!isMemLocWinOpened) {
sf.ui.proTools.menuClick({ menuPath: ['Window', 'Memory Locations'], targetValue: "Disable" })
};
};
clearMemoryLocations('Location')
Links
User UID: nd6Qe53F7GZkvB9oRsB1wJsVINy2
Feedback Key: sffeedback:nd6Qe53F7GZkvB9oRsB1wJsVINy2:-NnLGFmHkmHeec7W8e4n
Feedback ZIP: BcdiS0ddf1j43MB/8oH4Ip5NI0RZxDWA+KEqDNfjPe5aIwrVUW/cSvwWrs6pYmR5fuI/7bfAoMSfznAwZQEnysRh+y4N8f9DPX1/ePS+GyxOnY8BvqORJddH22YbTxdZ0jVaI1MCNy1vw1RWeMYWwTvkRwBbpJv2CV12doaU2Tod5Yv4gGA+M5vhMVUiHMTcRLqCKgEjWmV34zT0xwh0V8C8Z2f7OFBIoITjQQtGeyGwJqQP6XPRSW/RdOhkzN2O34c9wgJcM5R9EQVRn58/yIbNJlPd2oMvAiNl7WaR46K2meU9WZK2DSdnLvvA+vDakIIe+rwB4lj99Ql5RRNz5w==
- Christian Scheuer @chrscheuer2024-01-04 21:13:10.770Z
Hi Luke,
Thanks for posting here :)
Try using this script instead:
var numbersToDelete = []; for (let memLoc of Array.from(sf.app.proTools.memoryLocations.allItems)) { if (memLoc.name.startsWith('Location')) { numbersToDelete.push(memLoc.number); } } sf.app.proTools.clearMemoryLocations({ numbers: numbersToDelete, });
- LLuke Dunn Gielmuda @Luke_Dunn_Gielmuda
wow, that works way faster than my original! thank you Christian.
Christian Scheuer @chrscheuer2024-01-05 00:32:46.249Z
Thanks, Luke - I'm happy it helped.
- LLuke Dunn Gielmuda @Luke_Dunn_Gielmuda
Hi Christian, unfortunately i've now run in to some issues with it. firstly it would randomly stop working and the only way for it to work would be to restart Soundflow. But even worse once i started having track markers it randomly deletes markers on those tracks that's names did not contain "Location".
Christian Scheuer @chrscheuer2024-01-13 13:49:32.539Z
Hi Luke,
I don't know why it would delete markers with names not containing Location, but it could be that it contains an old cache of memory locations that don't currently get invalidated.
To fix that, try inserting this as a first line in the script:
sf.app.proTools.memoryLocations.invalidate();
- LLuke Dunn Gielmuda @Luke_Dunn_Gielmuda
That's fixed it. I'll keep you posted if anything else odd happens. thanks!
- In reply tochrscheuer⬆:CChava Solís @Chava_Solis
I tried this code but it won't work. I wonder if it has to do with ProTools updates or if I'm doing something wrong.
Soundflow shows this message:
Christian Scheuer @chrscheuer2024-08-12 19:02:08.000Z
@Chava_Solis, you're using a very, very old version of SoundFlow (5.4.6). Be sure to update here (5.8.1 is the most recent as of this writing):
https://soundflow.org/account/downloads- CChava Solís @Chava_Solis
Thank you, Chris. Worked like magic.