Very new to KM, so sorry if this is simple! I'm trying to create a macro that allows me to save versions of an applications project (Ableton), with an incremental number at the end of each save.
I'm very confused as to how to get KM to read the original saved name in the 'Save As' dialogue, and then add the number onto the end. And the delete that number and add the next next time I run the macro etc.
The trouble with Ableton is that it doesn't allow you to use system hotkeys while in the Save dialog, so you can't, for example, copy the current filename.
I've come up with a workaround that gets the current project name from the window title. It will of course only work if the standard Ableton window is frontmost, as the second window doesn't have a title. If required, I can use a bit of applescript to make getting the window name possible regardless of which window is in focus.
I saved a project as "Test" and the resultant window title was "Test [Test]". I'm not sure why there's a duplicate of the name in square brackets, but I removed it using regex.
I'm sure someone else could make this a bit more efficient, but it's worked in my testing. As I'm so crap with regex, I opted for the Split Text plugin for part of this.
Great, glad it works! Just be aware that if you open a previous version and then save-as, it will increment it from that point.
So "Test - v.3" would try to save as "Test - v.4" even if v.4 already exists. We could come up with a workaround, but as long as you're aware of it, it's probably fine to go old-skool and manually save-as in those instances.
Maybe it's possible to look in the folder the project is saving to and find the highest number when you're on an older version? In all honesty it doesn't seem to be too much of a problem just doing it manually. It kicks up an error message, so no damage can be done I don't think. Might actually be useful to remember you're editing an older version.
Actually, would it be possible for it to add a '.1' if it encounters that error message? So if you're editing an older version and save, it starts incrementing from that versions number, along with .1, .2 etc? Not needed at all but would be handy.
Me too bud! I was an absolute beginner last summer, and I've only got the basics down, but you can do a lot with those and some clarity of purpose. Be warned: it does become quite addictive and you may find yourself, like me, checking the forum regularly, looking for new challenges that you feel might be within your modest skillset to achieve. It's oddly rewarding!
Definitely. I've had it for a while, but only needed it for a specific thing. Just got the new Metagrid Pro and yeah, can feel the addiction coming on. Mega useful.
The increment increments incremental works great apart from one small thing. It adds the subsequent incremental to the first number instead of the second. So it goes 2.1 instead of 1.2. Tried to figure it out, but quickly broke it. Which part should I be looking at?