Hi
I am using Ableton Live and every time they release a new version, they change the saved file format meaning when saving that have to be saved as the new format in a new folder as they will not allow over-writing of the old file. Very annoying, especially when I have over 200 song files!
I am hoping I can create a KM macro to iterate through all the song files in my existing 'Songs' folder and save them out to the new folder in their new format.
To do this in Ableton I would do the following on each song file
Open the song file (Ableton calls them 'Projects')
Select File/Save Live Set As...
Select the new folder as the destination
Press the 'Save' button
then finally select File/Collect All And Save and press the 'OK' button
I am new to KM and have made a start on this but got stuck on step 3 as I can't see how to select the folder I want for Ableton to save the project into
Hope this can be done. I spend hours every time they do this saving all my files into a new folder.
Assuming your Macro is replicating what you would do in the App (and it seems it is from your list of steps) you can set the path to a folder in an Open Dialog by making use of the Mac's inbuilt shortcut ⇧⌘G
When you are in any Open or Save dialog in an App, pressing ⇧⌘G brings up another dialog that allows you to enter the path to the folder you want.
Here is a link to a recent post explaining this in full:
Or (and this is what I do) you can use an excellent Keyboard Maestro plugin made by @noisneil which reduces all the steps to one Keyboard Maestro Action.
But I am completely new to KM (I tried it to see if it would do this particular task). So I am very lost at present.
I am a programmer by trade so I Am sure with some examples I could work it out, but I am struggling to find relevant examples. Such as iterating through a list of files in a folder. Or Controlling an app by menu & button selections.
Yes that sounds like it would do the trick.
But to be honest, I am struggling to get to grips with KM to do the other stuff too; iterate through a list of files in a folder; pick out each individual file and save it to another place etc.
I am a programmer by trade but can't seem to find relevant examples that I can learn from. Maybe I am looking in the wrong place?
I find the quickest way to get to an answer like that for Keyboard Maestro is to type in a search in Google rather than searching in the Forum directly. So for how to iterate through files I would search for "Keyboard Maestro iterate through files" in Google. This will very often take you straight to this forum to a thread that is discussing whatever you want to do. In this case when I typed it in, the first result was:
Your approach of breaking your task into steps you would do manually and then trying to replace those steps in Keyboard Maestro is exactly the right approach.
Keyboard Maestro uses Actions one after the other, which are like building blocks. The great thing is that once you have a Macro that works you can refine it if you find a better way to do any of the steps just by swapping that Action out for a new one. The modular nature of Keyboard Maestro's Actions and the fact you can even incorporate snippets of AppleScript and other programming languages in the Actions means there are usually many ways to solve a task.
Keyboard Maestro iterates through selected files in the Finder, using its For Each Action.
Here is an example, using Photoshop to open files selected in the Finder, one after the other and choose to export them:
As this would lead to a Dialog popping up for each one to ask where to export to, that is where the method I mentioned in my first thread would allow you to specify the folder.
Keyboard Maestro has an Action to press buttons in dialogs. So, you could have it press the "save" button. And then the For Each Action would move onto the next file you wanted to process.
Sometimes Keyboard Maestro can get out of step with an Application because the Actions are coming one after the other too fast. In my example, it might be that there would need to be a pause to wait for Photoshop to fully open the file before moving onto the next step. Keyboard Maestro can pause between Actions for a set time (like 3") or it can pause until something changes (such as a menu item becoming available).
I think the best thing is for you to try to bolt together a Macro and if you get stuck upload what you have so far to this forum where you will find a lot of willing help to get it to work.