Quickly add new Tweetbot mute keyword using Keyboard Maestro
I love me some Twitter, but I find that some days the internet is talking about something I just don't care about. That's where "mute filters"' come in. Tweetbot lets you mute words or phrases and will hide subsequent tweets that match your filter.
The problem is that adding a new "mute keyword" to Tweetbot requires way too many steps.
- Switch to the "Mutes" tab
- Click "Edit"
- Click "+"
- Click "Mute Keyword"
- Click inside the Keyword field because, for some frustrating reason, Tweetbot doesn't put the cursor there automatically.
- Click "Save"
- Click "Done"
- Go back to the main timeline
Eight is way more than enough, it's about seven too many. Here's what I want: Press a key combination, type a word / phrase, press enter. Boom. Done.
Wait! Too many, annoying, repetitive steps!? Automate it!
As I've said repeatedly, once you get into the "automation mindset" you'll start to find uses for it all over the place. This is yet another example.
Keyboard Maestro is one of my favorite tools for this on the Mac, specifically because it can do so many of these things, and making a new macro is easy. However, since this does not need to be a "global" macro (that is, it doesn't need to work anywhere, anytime, it just needs to work when I'm using Tweetbot) my first step was to make a new "group" in Keyboard Maestro by choosing the "File » New Macro Group" menu. I named it "Tweetbot" because I am wildly creative. Then I told Keyboard Maestro that any macros in this new group should only be available in one application.
The red arrows in the image below point to the Macro Group and the setting to show that it is only active in Tweetbot, and the yellow arrows point to the list of macros in that group. Right now there is only one, but if I ever want to make any more that are only for Tweetbot, I just have to drag them into that folder.
This is important because it allows me to define a keyboard shortcut in Keyboard Maestro which will only be used when I am in Tweetbot. Now I don't have to worry about it being accidentally triggered in other applications. I chose ⌘ + = because it seems like a good "Add" shortcut, and it was not already in use in Tweetbot.
Now let's make the macro
Here are the steps the macro will take once I press ⌘ + =:
- Prompt user for word/phrase to add to Tweetbot mute filter. (See "Screenshot #1" below.)
- Select the "Mutes" item from the "Window" menu
- Click the "Edit" button
- Click the mouse on the "+" button (see the red arrow on "Screenshot #2" image below)
- Press "Enter" to select 'Mute Keyword (see the blue arrow on "Screenshot #2" image below)
- Press Tab twice to get into the proper field to add the keyword(s) to be filtered
- Paste the text that the user entered (see Important Note below)
- Click "Save" button
- Click "Done" button
- Pause for 1.5 seconds to that I can see the new filter has been created
- Go back to my Timeline (which is probably where I was reading when I decided I needed to mute something
Keyboard Maestro comes with an item to "prompt user for input" and allows you to easily customize it. Here's what mine looks like:
Note that this is the very first step in the macro. I could have scripted this differently. For example, I could have created a macro that did the first six steps and then waited for me to enter the mute keyword(s) and then continued. I chose not to do that for several reasons:
- By prompting the user for input immediately, we give the user a chance to cancel the macro, in case s/he triggered it accidentally or changed his/her mind about it.
- The user will not have any delay between triggering the macro and being asked for input, so there's less of a chance for them to forget what it was they wanted to mute.
- The user will still be looking at whatever screen they were at when they decided to add to the mute keyword(s) list. This is particularly helpful if I need to verify the spelling of something.
The only "tricky" part is this:
The "Done" button on the top-right corner changed from "Edit" after we clicked that button. I tried telling Keyboard Maestro to click the "+" button, but that did not seem to work reliably, so instead I told it to click at a certain number of pixels relative to the top-left corner if the front window. (You can calculate the pixel count using xScope or by trial and error.)
Once the "+" button has been clicked (red arrow) and then we need to select "Mute Keyword" (blue arrow). The good news is that once we have done the mouse click on the "+" button, the "Mute Keyword" entry will be highlighted, so all we need to do is simulate pressing the Enter key after the "+" button has been pressed.
When you mute a keyword, Tweetbot will let you 1) mute mentions, and 2) set how long you want the mute to be active (one day, one week, one month, forever). I do not adjust these settings in this macro, which (at least for me) appears to mean that mentions will not be muted and that the filter will be in place forever, which is what I want. I'm not sure if Tweetbot changes those settings based on your previous settings or not.
If you want something different, you can change those settings using Keyboard Maestro too. Doing so is left as an exercise to the reader.
One thing I really like about Tweetbot is that these filters sync between the Mac and iOS client, so you don't have to maintain multiple filter lists.
Download my macro
Subscribe to Newsletter
Software Updatesmore updates
- Apple Remote Desktop updated with Yosemite support
- OS X Yosemite 10.10.2, iOS 8.1.3 updates now available
- Sports Illustrated 120 SPORTS channel comes to Apple TV
- Logic Pro X update brings AirDrop support, new effects, tools, and more
- Parallels Access 2.5 released, adds file manager, computer-to-computer remote access
- The Google Translate iOS app is about to get a lot smarter