Navigate to a specific folder in a bounce dialog box in Logic
Hey all,
fine tuning some things here and being able to script navigating to a specific folder in a session would be very useful. For example I understand that
var folder = "...";
sf.keyboard.type({ text: folder });
sf.keyboard.press({ keys: 'enter' });
Will move me to exact folder path I type into the "..." But what if I want to move to the Audio Files folder of the open session in LPX.. Or perhaps the bounce folder?
Is that possible to script?
Thanks
Matt Hennessy
- samuel henriques @samuel_henriques
Hello Matt,
I think Kitch has your solution, check it out.
How to navigate to current session folder in Logic. #post-6samuel henriques @samuel_henriques
Not sure if something has changed on OSX. For Kitch' code to work for me I need to change:
const filePath = logic.mainWindow.getString("AXDocument").slice(7, -1);
with:
const filePath = logic.mainWindow.getString("AXDocument").slice(7, -1).replace(/%20/g, " ");
Let me know if it works for you.
- MIn reply toMatt_Hennessy⬆:Matt Hennessy @Matt_Hennessy
Well that opens a folder in users/music in the finder, but what Im looking to do is navigate to a folder in the "Save As" window. I realize now I failed to mention that in the OP... my bad.
So for example when I bounce to disk some scripts i need the file to go the audio files folder and some the bounces folder.. I want to automate the selection of that folder in the save as window.
Thanks
- MIn reply toMatt_Hennessy⬆:Matt Hennessy @Matt_Hennessy
@samuel_henriques I figured it out tho thanks to you! Combining the 2 scripts works. This script from the save as dialog box takes me where i want to go. Thank you!
const logic = sf.ui.app('com.apple.logic10'); const filePath = logic.mainWindow.getString("AXDocument").slice(7, -1).replace(/%20/g, " "); const folderPath = filePath.split('/').slice(0, -1).join('/'); const sessionName = filePath.split('/').slice(-1)[0].split('.logicx')[0]; const fileExtension = '.logicx'; //Goto Bounces Folder// sf.keyboard.type({ text: folderPath + '/Bounces/' }); sf.wait({ intervalMs: 250, }); sf.keyboard.press({ keys: 'enter' });