⌘ Using Rsync and Keyboard Maestro to Merge and Purge thousands of redundant files

A perfect example of combining the power of the Shell and Keyboard Maestro. Quite some time ago I removed my individual external drives from their cases and combined them into several multi-unit drive enclosures. This was very convenient, but led to the issue of many, many duplicates across multiple drives. Consolidating all these files has turned out to be more of a chore than I expected. Merging folders is either a foreign concept or a dirty word. Apps have no idea how to handle it. If I have Drive 1 and Drive 2, if files already exist on Drive 1, simply skip them. If there is a new file, copy it over, but don’t waste time copying something that already exists in the destination. At the end, delete all the files off Drive 2 so I can reclaim the space. Don’t leave it 98% full like it was before. For this task, only a handful of files should be copied. […]

⌘ 101 Things to do with Keyboard Maestro

To be fair, I don’t have 101 macros written, yet. But, I’m well on my way. Although, reading the forums, there are others who have done that and more. A few sophisticated users have a couple hundred macros covering dozens of different areas. I have jealousy and hope to be that proficient one day. What I’ve learned is that Keyboard Maestro is far more than a “macro” tool. It’s every bit a development environment. A development environment that with a small time investment and a bit of research, can create custom solutions for all sorts of situations. It’s even possible to replicate the functionality of off the shelf software, or in some cases replace it. It may not be 100% parity, but it will accomplish the core functionality. For example, here’s a few of the applets I’ve created so far. Filter the clipboard to remove extraneous text from Amazon links Rename files as they are added to a folder Move […]

Convert letters to phone keypad numbers with Keyboard Maestro

I ran into this the other day where I needed to convert my username to digits I could type on a phone keypad. While not a big deal, there are plenty of online tools to do it, I wondered if it could be done with Keyboard Maestro. The answer is yes, and in just a few blocks. This is a simple macro, but it has a couple of neat items. First, it gets the text to convert. That text is converted to lowercase and any spaces are removed. It then uses RegEx to check a range of letters such as [a-c] or [d-f] to see what number on the keypad to assign. The values can also be separated using the pipe | symbol. [a|b|c] would be a or b or c. That’s convenient. Once the conversion is done, the final result is copied to the clipboard. This could easily be changed to a text box where the value could be […]

Position and Resize Windows with Keyboard Maestro

There are dedicated tools like Magnet and Display Maid to position and resize windows. However, if you have Keyboard Maestro you can emulate that functionality. It takes a small amount of effort and two simple macros. The first step is to arrange windows in the desired location and at the correct size. That done, it’s time to create a simple macro to record the window locations so they can be used in another macro. Keyboard Maestro has built-in commands to display the window name, position, and size. We’ll use these to capture the coordinates of the window. Top: %Calculate%WinFrame.Top%Left: %Calculate%WinFrame.Left%Width: %Calculate%WinFrame.Width%Height: %Calculate%WinFrame.Height% This macro will trigger when the window focus changes. As you click different windows, the name and position are displayed in a Keyboard Maestro result window. This is a macro you will want to turn off once this bit of testing is complete. With all the window positions recorded, the next step is to use the Move a […]

Text Filtering and Replace with Keyboard Maestro

Along with many other features, Keyboard Maestro has some solid text Filtering features. You can combine this with Search and Replace to strip formatting and clean text. If it’s extensive, I hand this task over to TextSoap, but Keyboard Maestro has quite a few tricks to work with. For example, the Filter block has some built in ways to clean text. As an example, there is: The Search and Replace block can replace words as well as use Regular Expressions. This can be used to remove Tab, CRLF, and other characters that Filter may miss. I used this for a variety of tasks. The obvious is stripping out characters or making sure everything is lowercase. I’ve also taken Katalon Studio comments and stripped out the // and /* blocks so I could use my comments in documentation. Another use has been a macro to convert JIRA tickets into a task list. I copy the text, then use Keyboard Maestro to […]