KeyboardMaestro

Latest

  • Patch GrowlVoice using Keyboard Maestro to prolong its life

    by 
    TJ Luoma
    TJ Luoma
    04.26.2014

    Google recently made some changes to the way Google Voice responds to some requests, and GrowlVoice stopped working. Update (2014-05-10): There is now a much easier way to do this now. See http://github.com/szhu/fix-growlvoice for instructions on patching this which does not require Keyboard Maestro. Background: As I understand it, there has never been an official API for Google Voice, so developers have had to figure things out on their own and build a workable solution without the tools they really need. Google has announced plans to integrate Google Voice into Google Hangouts, and the recent change which broke GrowlVoice was part of that. Could GrowlVoice be patched to fix this? Probably, but how long will it be until Google changes something else? And how long will it take Apple to approve the update for the Mac App Store? With no official API for Google Voice, and Google Voice's entire future uncertain, I don't think I'd want to try keeping the app working either if I was the developer. However, just as clever developers found a way to make Google Voice work without an official API, someone else has figured out how to make Google Voice's current setup work with GrowlVoice, to extend its life, at least until Google changes something else. Elliot Kroo (@ellkro) came up with an ingenious solution to patch the information that comes from Google Voice so that GrowlVoice can understand it. His instructions can be found at: https://gist.github.com/kroo/11205755. A big-time hat-tip and thank you to Terry McCall (@hagure) for telling me about Elliot's instructions! Unfortunately, even after you download the necessary files, this fix requires that you run a Terminal command every time GrowlVoice launches. You can probably already guess what I thought when I heard that: "Wait... you have to do something every time something else happens? Can I automate that?" Spoiler alert: yes. How? Say it with me: Keyboard Maestro. Here are the (non-automated) steps involved Before we can automate it, we have to know what steps to take to make it work manually. Download the files described in the 'gist' Launch GrowlVoice Wait for an alert panel that looks like this: Press OK Run command OK, now that we know the steps, we can automate them. How to do this in Keyboard Maestro Create a new macro which will run the following commands every time GrowlVoice launches: "Pause Until" there is a button "OK" Press "OK" button Run Terminal commands Now, that last step is a little tricky because one of those commands has to be run with elevated "permissions" which can be done, but requires some extra work. There are two ways to accomplish this: with AppleScript or with sudo. (N.B: Step 3 will also download the necessary files if they are not already installed.) AppleScript This way is a little easier, because you don't have to get into the Terminal. However, you have to enter your administrator password every time GrowlVoice launches: sudo Requires that you add an entry to your /etc/sudoers file via visudo But once the initial configuration is done, everything else can be automated, meaning that you do not have to enter your password each time GrowlVoice launches. This is the line you need to add to /etc/sudoers: %admin ALL=NOPASSWD: /Users/luomat/Dropbox/etc/fix-growlvoice/cycript However, you need to change /Users/luomat/Dropbox/etc/fix-growlvoice/ to the correct path on your Mac. If you aren't sure what any of that means, use the AppleScript version. Download Download and install one of these into Keyboard Maestro: Fix-GrowlVoice-with-AppleScript Fix-GrowlVoice-with-sudo Whichever one you use, you will have to edit the line in the shell script section: DIR="$HOME/Dropbox/etc/fix-growlvoice/" change that to be wherever you want the files to be kept. (If you use the sudo version, $DIR should be the folder where the cycript command is found.) Regardless of which version you choose, the first time you run it, the necessary files (as referenced in the "gist" above) will be downloaded and installed the directory you set as $DIR. It's not a fix, it's a patch If GrowlVoice's developer doesn't update the app, this patch will only work until Google changes something else, and it will have to be run each time the app launches. It might not be the most elegant solution ever, but it's better than not having GrowlVoice at all. Again my thanks to Elliot Kroo (@ellkro) and Terry McCall (@hagure). Some days I really love the Internet.

  • Auto-Save Microsoft Word with Keyboard Maestro

    by 
    TJ Luoma
    TJ Luoma
    04.16.2014

    In Mac Power Users Episode 187, David Sparks and Katie Floyd talked about word processing apps, which meant talking a great deal about Microsoft Word, as well as Pages and others. Around the 38m40s mark, Katie mentioned that she uses Word a lot in her day job, and has a lot of issues with the app freezing up periodically. That led her to make a comment about intending to write a Keyboard Maestro macro to save every minute when using Microsoft Word. Having recently finished my D.Min. thesis in Microsoft Word[1], I already had a macro for that. As I was writing this article, it also occurred to me that I would like to save when Microsoft Word deactivates (is no longer the front-most app). However, even if you don't use Keyboard Maestro, I encourage you to read on, because I'm going to offer another suggestion at the end. Auto-Save every X minutes (or seconds) This probably is not what you want, although there is no harm in setting it. Microsoft Word does have an auto-recovery setting, but nothing beats the security of manually saving. Unlike modern apps, Microsoft Word does not support the versioning and auto-save features in OS X. Keyboard Maestro can run that save command every X seconds or minutes. The macro is designed to run only when Microsoft Word is active, and I set mine to run every minute. However, with Keyboard Maestro I don't have to just blindly save every sixty seconds, I can check specific criteria. I chose two: The front window of Microsoft Word exists (this means that there is an open document window in Word) A menu item "Save" is enabled (you'd find it under the "File" menu) Note that when the "Save As" window is open in Microsoft Word, the "Save" menu is disabled. That is not true in all apps, so if you implement this macro for another app, you may want to check that a button "Save" does not exist. Here is how those two conditions appear in Keyboard Maestro: Next we get to the actions section, and I included two here, although many people might choose to delete one of them. The first is a notification which will appear and inform the user that the macro is running. After awhile, that might get annoying, but I suggest using it until you get used to the idea, as it will help reinforce the fact that the macro is actually running. The second is the action which actually saves the document. You can do this one of two ways in Keyboard Maestro: Choose the menu item "Save" under the "File" menu, or Simulate ⌘ +S Most times I prefer to have Keyboard Maestro use the file menu, rather than keyboard shortcuts, because it's easier to understand what the macro is doing when I'm reviewing them in Keyboard Maestro. However, ⌘ +S is perfectly clear, and it should prevent the macro from causing any problems if I happen to be typing when it runs. So I recommend having Keyboard Maestro use keyboard shortcuts when it makes sense to do so. The only downside to this is that if you are navigating through Microsoft Word's menus at the same time that the macro runs, the menu will close, but the same problem will occur if we tell our macro to use the menu item File » Save. Auto-Save Microsoft Word when you switch to another app Saving your document while you are using Word is great, but what happens when you switch to another app? If you have been editing that Word document for at least a minute, it should have saved a recent copy, but wouldn't it be great if you could save every time you switched away from Word? But how? Obviously once we have switched away from Word, pressing ⌘ +S isn't going to save the current word document. Couldn't we tell Keyboard Maestro to use the menu item for Word, even after Word is no longer the front-most app? Nope. I learned this one the hard way with another app. The reason it won't work is obvious once you think about it: you switch away to another app, then Keyboard Maestro switches back to Word to save... then what happens? Well, either a) Keyboard Maestro leaves you in Word, which isn't what you wanted, or b) it switches you to away to another app... which will trigger the Keyboard Maestro macro to run again. We have now discovered something called an infinite loop, and I don't mean the address in Cupertino. So how can we do this? The answer is AppleScript: During the Mac Power Users episode, David mentioned several times that Microsoft Office has great AppleScript support, and he even mentioned Ben Waldie whose article is where I found this simple AppleScript command which tells Microsoft Word to save its current document.[2] This AppleScript command is nearly magic for three reasons: It does not require Microsoft Word to be active (front-most) in order for it to work, nor does it bring Microsoft Word to the front when it runs. If there is no active document, the AppleScript command will not cause any noticeable errors: no system beep, nothing. If you are navigating Word's menus when the AppleScript command is triggered, it will wait until the menu closes before running. Remember how I said that ⌘ +S had one downside? Well, this AppleScript command doesn't have it. Remember those conditions that we had to check for ("Does Microsoft Word have an existing front window? Is the 'Save' menu enabled?")? Now we don't need to worry about any of that. In fact, we no longer need two separate macros, all we need is one macro which will run: Every minute when Microsoft Word is active Any time that Microsoft Word deactivates Since we no longer need to check for any more conditions, all we need is one action, that AppleScript command. So now the whole thing just looks like this: Of course I added some additional comments and notifications, which you can delete if you don't want them. Installation To install this: download the macro, double-click on it, and it will be imported into Keyboard Maestro. Bonus Tips As mentioned above, Microsoft Word does not support OS X versions; however, if you save your Word documents to Dropbox it will save all of your changes for 30 days. Don't want to use Dropbox, but want locally saved versions? Take a look at ForeverSave 2 which not only gives you "versions" (even for apps that don't support OS X's implementation) but also can simulate ⌘ + S every X seconds (which means you wouldn't necessarily even need my Keyboard Maestro macro, although it's a more elegant and complete solution). There is a free demo version of ForeverSave 2 available, and a license is US$20. I have been using it and think it is quite useful. Because I had to, that's why. David went to great lengths to say that he doesn't think Word is as bad as its reputation, and a lot of it is leftover anti-Microsoft sentiments or something. I disagree. For a big project, MSWord was a giant PITA. Besides that, even with The Ribbon, by default what you get when you create a new document in Word just looks... gross. The good news is you can make it look much better. ↩ The only change I made was to add the check to see if Word is running, because if you quit Word that counts as deactivation which would trigger the AppleScript which would launch Word. ↩

  • Keyboard Maestro on sale in Productive Macs bundle plus revised time tracking macro

    by 
    TJ Luoma
    TJ Luoma
    11.07.2013

    Before I get into today's main topic, I want to remind you that until November 18th, you can get Keyboard Maestro as part of the current Productive Macs bundle. For $30 you get seven apps, including Keyboard Maestro (normally $36) and another utility I highly recommend, DefaultFolderX which normally sells for $35. So you can get both apps for less than the cost of either – plus five other apps! Grab that bundle. Now, as part of my quest to get people over the initial learning curve of Keyboard Maestro, I'm going to revisit Terminally Geeky Time Tracking via Screenshots and show you how I've made it much, much simpler. A quick bit of background It was a day like too many others: I was being pulled in a dozen directions and couldn't keep track of all my different projects. I knew I wasn't going to be able to remember everything I had worked on, and I was afraid I would forget to go back and finish something. A more organized person would have kept notes or put things into OmniFocus, but I needed something that required no effort from me to maintain once I set it up. I needed someone to walk around behind me taking notes of the things I was leaving behind, or some way to leave myself a trail of virtual breadcrumbs to retrace my steps. Then it hit me: a Keyboard Maestro macro which takes a screenshot every 30 seconds. Review the screenshots at the end of the day to see where I spent my time, and make sure I didn't forget anything important. If you want more detail, you can read the original post, or you can listen to Episode 71 of the "Home Work" podcast where I talked about it with my TUAW colleague (and "Home Work" co-host) Dave Caolo. Mavericks broke the old version, but that's OK because this version is better anyway. My original solution was called screenshot journal, and it was built around a shell script which could be called either by Keyboard Maestro or by launchd. That script was built around /usr/sbin/screencapture to take screenshots. Unfortunately, as of OS X version 10.9.0, screencapture does not work if you use multiple monitors. I suspect this will be fixed in a later version of OS X, but here's the good news: you don't need a separate shell script anymore. As I mentioned in the original article, Keyboard Maestro was always the best solution, but I added the launchd method as an alternative, even though it wasn't nearly as good. Version 2 of screenshot journal is Keyboard Maestro-only, which means that not only do you get the original benefits, but it's now easier to install, configure, edit, change, and maintain. All you need to do is download the Keyboard Maestro macro and import it into Keyboard Maestro. There is no step three. How to install the Keyboard Maestro macro Adding my new Keyboard Maestro macro to your computer is very easy. Obviously you need to have Keyboard Maestro installed and running on your Mac. It comes with a free 30-day trial period, so if you haven't bought it yet, you can try it out first. Once you have it installed and running, simply download Screenshot-Journal.kmmacros by control+clicking on that link and choose "Download Linked File As..." if you use Safari or "Save Link As..." if you use Chrome (or whatever similar option your browser offers). Save the file as Screenshot-Journal.kmmacros Note that Safari may decide to name the file Screenshot-Journal.kmmacros.txt If so, just change the filename so that it ends with ".kmmacros" and if a dialogue appears asking you to confirm the change, select the "Use .kmmacros" button, as shown here: Once the file is properly named, double-click it and it will automatically import into Keyboard Maestro. Boom! Done. What it does and how it works At its core, all this macro does is take a screenshot and save it. Everything else is details. Then again, depending on who you ask, God, the devil, or delight is in the details, so they aren't to be overlooked. So, while you keep that core idea in mind, here are the details: Each screenshot has a unique name, and that name starts with the current time, in 24-hour format. That way you can easily sort an entire day's worth of screenshots in the Finder and retrace what you did. The filesystem does not like colons in filenames, so I use "." instead. For example, if a screenshot was taken 7 seconds after 3:22 p.m. the filename would start with 15.22.07. The macro will run every minute that you are logged into your Mac, starting at 6:30 a.m. and ending at 11:00 p.m. (You can easily change the starting and ending times, as well as how often it runs, just by clicking up and down arrows in Keyboard Maestro.) The macro will also run anytime you press the keyboard shortcut: Option/Alt (⌥) plus shift plus 3 (Note that there is no command (⌘) key.) You can easily change that keyboard shortcut in Keyboard Maestro, or set it not to have a keyboard shortcut at all. Last (but truly not least!) the macro will run any time a new application activates. For example, if you are using BBEdit and then press ⌘ + Tab to switch to Finder, the macro will take a screenshot. I added this because I realized that no matter how short the interval was between the macro automatically running, I might briefly switch to another app, do something, and then switch back to the original app. The only way to catch that was to run every time a new app was activated. This also allows you to set a higher interval between timed execution of the macro. (You could even disable the timed execution altogether and only have it run when a new app activates, but I don't recommend that because you might switch tasks within the same app. For example, maybe you started our reading your Gmail, but then you clicked a YouTube link and spent the next several hours reading Wikipedia. If you only took screenshots when you switched out of Safari, you could end up with an hours-long gap that shows you were using your web browser, but without showing you what you were doing in it. On the other hand, if the computer has been idle (meaning no keyboard or mouse/trackpad input) for more than 2 minutes, the macro will not save a screenshot. Chances are that you have stepped away from your Mac, and a new screenshot would be the same as the previous screenshot. (Instead, an empty text file is created with a special name so you can see that the macro ran but found the computer idle.) Also, if the screensaver is running or if the screen is turned off, the macro will not save a screenshot. (Instead, an empty text file is created with a special name so you can see that the macro ran but found the screensaver running.) If you use more than one monitor, Keyboard Maestro will screen capture all of them into one image file. Image files are saved as GIFs by default, but you can easily change that within Keyboard Maestro just by selecting one of the options in a drop-down menu. (Note: in my testing, JPG screenshots were more than twice the size of GIFs, and PNG screenshots were almost three times the size!) All screenshots are saved to ~/Pictures/screenshot-journal/ but you can choose a different folder if you wish. Sub-folders are automatically created for each day, so (for example) all of the files created on November 8th, 2013 would be saved to ~/Pictures/screenshot-journal/2013–11–08/. Collecting them into dated folders makes it easy to sort them in the Finder, and you can easily trash screenshots from previous days if you no longer need them. The image filenames also show 2 other pieces of information: 1) the name of the active application at the time the screenshot was taken and 2) the name of the active window in that application (if one exists). That way you can easily look through the filenames and get a rough idea of what you were working on. For example, my most recent image filename is "22.13.59.MultiMarkdown Composer (screenshot-journal–2.mmd).gif" which tells me that at 11:13:59 p.m. I was working on a document named "screenshot-journal–2.mmd" in MultiMarkdown Composer. If you decide that you do not want to use this macro any more, simply disable it by selecting the macro in Keyboard Maestro, and then choose the menu item: View » Toggle Enable, as shown here: If you change your mind want to try it again at some point in the future, use the same "Toggle Enable" menu option when the macro is selected in Keyboard Maestro. Final thoughts If you are worried about CPU usage of something like this running every minute, all I can tell you is that I never notice it on my 2010 MacBook Air. This macro isn't fancy, and it doesn't do any analysis. That isn't what it was meant to do, but if you want a Mac app that can do that, checkout Time Sink from the great folks at Many Tricks. You can try it free for two weeks, and then buy it for $5 from the developers or from the Mac App Store As always, I prefer to buy direct. The money goes directly to the developers, you get faster updates because you don't have to wait for the Mac App Store approval process, and you don't have to worry that Apple will change the Mac App Store rules (again!) so that apps no longer work or have to remove functionality. (If Time Sink isn't what you are looking for, several people have recommended Rescue Time to me. I haven't used it yet, but they have a free version which you can sign up for without any credit card information.) It should go without saying that there are some minor security and privacy issues that go with using any sort of automatic time tracking program. If someone else can access your Mac, they could look through your folder of screenshots and see what you've been doing all day. That being said, if someone has access to your Mac, you should either trust them enough not to worry about them snooping around, or you should use a short screensaver timeout and require a password to unlock it. This macro has been very helpful to me. It can be a bit intimidating or even scary at first, but being able to trace back through my day and see where my time went has proven to be useful time and time again.

  • A simple Keyboard Maestro macro for plain-text pasting anywhere

    by 
    TJ Luoma
    TJ Luoma
    10.14.2013

    Keyboard Maestro can be intimidating at first. I have made some extremely elaborate Keyboard Maestro macros, but today I want to show you the one that I absolutely, positively use most often. Ready? ⌥ + V (Option/Alt + V) Mind-blowing, isn't it? OK, I can see you are not convinced yet. But wait until you hear what it does: Remove any formatting from the clipboard.[1] Inserts the clipboard text by typing. Here are a few of the scenarios when this comes in handy: any time you want to "paste" text, but do not wanted any formatting kept in the pasted text any time you are faced with a text field that does not respond to a ⌘ + V (paste) command any time you need to enter a phone number into one of those stupid web forms that uses three different fields for a phone number (area code + prefix + suffix) where you can't use "paste" because it will put all of the digits into the first box That might not sound like much, but I use this keyboard shortcut several times per day. I use it when I know that I don't want formatting and am not sure if pasting it will preserve formatting or not. I use it when I have to enter text into a field that limits the number of characters available, so I can tell when I hit the limit (which also often fails if you just paste). I use it when I want to make sure that I paste a URL and not an HTML link (as some apps -- I'm looking at you, Messages.app on the Mac). Keyboard Maestro types the characters as fast as possible, which is almost always plenty fast enough for me. If you have the full text of your novel on the clipboard, then maybe you want to use ⌘ + V to paste, but otherwise, I almost always find myself using ⌥ + V instead. You can download my Keyboard Maestro macro here, courtesy of Github. I have a bunch of other Keyboard Maestro macros available on my Github account as well. or pasteboard, whichever name you prefer. Keyboard Maestro calls it the "clipboard," so that's what I tend to use when talking about Keyboard Maestro. ↩

  • Replicating QuickCursor using BBEdit and Keyboard Maestro

    by 
    TJ Luoma
    TJ Luoma
    08.30.2013

    QuickCursor was the first app I bought on the Mac App Store. It was a great utility which let you send text from any application to your favorite text editor, and then when you were done, it would send the text back from your favorite text editor to the original application. For example, if I was writing a lengthy response to a question on AskDifferent in my web browser but didn't want to lose my work if the browser crashed, I could use QuickCursor to write it in BBEdit instead. (If you're still not clear on the concept, watch the YouTube video for QuickCursor.) Unfortunately sandboxing killed QuickCursor, meaning that it could no longer be sold through the Mac App Store. Jesse Grosjean, the developer, released the source code on GitHub because he was not planning to continue updating it. (Can't say that I blame him after making a great-but-niche-market app for the Mac App Store, only to have Apple change the rules and make it impossible to continue selling it in the Mac App Store.) I am still hopeful that someone will revive QuickCursor as a non-MAS app, but until that happens, I needed a temporary solution. BBEdit and Keyboard Maestro to the rescue, again. My solution to this problem is called Edit Anywhere. It uses Keyboard Maestro and BBEdit to replicate most of the functionality from QuickCursor. (It would be possible to adapt this to other text editors as well. See the GitHub README for details.) If you use those apps, all you have to do is download and import the Keyboard Maestro macro (note: make sure Keyboard Maestro is running before you try to import the .kmmacro file). Also, you'll need to make sure that you have installed BBEdit's command-line tool. If you purchased BBEdit directly from Bare Bones, you can use the "Install Command Line Tools..." menu option as show in the image here. (If you aren't sure if they are already installed, go ahead and use the menu. It will tell you if they are installed and up-to-date.) If you purchased BBEdit from the Mac App Store, you will need to download and install the tools from BareBones.com. How it works (Overview) In Keyboard Maestro you will need to choose a keyboard shortcut to trigger 'Edit Anywhere.' I use Command+Option+Control+Shift+Q. (That might seems complicated, but I have remapped my Caps Lock key to equal Command+Option+Control+Shift, so all I have to press is Caps Lock + Q. See Brett Terpstra's "A Useful Caps Lock Key" for more information.) You can, of course, set the keyboard shortcut to be anything you want. The macro tries to determine if you have selected text in the current application. If yes, it will only use that text. Otherwise, it will select all of the text from the current application. That text will be 'cut', saved to a temporary file in your Home directory, and then opened in BBEdit. When you finish editing the file, simply close it and you will be taken back to the app that you were using, and the text will be pasted back into place. If, for some reason, the process does not complete successfully, you will still have the edited text on your pasteboard and you can manually paste it wherever you want. Also, after each temporary 'Edit Anywhere' file is used it is moved to your Trash, where it will remain until you empty it, in case you need to recover text from one of those files. How it works (Nerdy Detail Level) If you don't care how this works 'under the hood' feel free to skip this section. I provided it for people who might be curious how to make their own Keyboard Maestro macros. If you download and import the macro into Keyboard Maestro, you should be able to follow along as I explain each step. First the macro checks to see if there is a menu item named 'Cut' which is enabled. Most Mac apps have an "Edit" menu with Cut, Copy, Paste, and Select All as sub-menu items. This is a quick test to see if the user has selected text in the current application. It is not foolproof, but it will cover us for most of the cases, and when it fails, all it means is that we will send all of the text to BBEdit instead of just the selected text. If the 'Cut' menu is not enabled, then we can assume that need to do 'Select All' in order to capture all of the text from the current application. We do this first by trying the menu item "Edit -> Select All" and if that does not work, we fall back on ⌘ + A , the usual keyboard shortcut for 'Select All' in most apps. (Again, this is not foolproof, but close enough for our purposes.) Then I added a very short (0.2 seconds) pause to the Keyboard Maestro macro. When testing this macro, I found that some apps (notably Gmail compose 'windows' in web browsers) needed a little extra time to make sure that 'Select All' had selected all of the text. By trial and error I came up with 0.2 seconds which seemed reliable without adding too much of a delay. Next we 'cut' the text using the menu "Edit -> Cut" if it exists or ⌘ + X (the common keyboard shortcut for 'Cut' in most apps). Why 'Cut' instead of 'Copy'? Wouldn't 'Copy' be safer since it leaves the text in the original app? There are a few reasons: Sometimes you can 'copy' when you can't 'cut' or 'paste.' For example, you can select text on a web page, but you can't cut or paste back to it. Better to have the macro fail quickly than to offer to do something that won't work. If the selected text from the original application gets unselected for some reason (either because of some AJAX tomfoolery, or because the user pressed an arrow key or happened to click the mouse somewhere in the area), then when the replacement text comes back in, it might either a) intermix with the old text or b) be pasted in either before or after the old text. If the user happens to switch away from BBEdit while editing their text, and then went back to the source app and saw the original text, they might forget that it was opened in BBEdit and start making changes to the original text which is going to be overwritten when the revised text came back. It would be better for them to switch to the app and be surprised to see an empty window, which will hopefully remind them to check BBEdit. Although it might seem unsafe to 'cut' the text away, almost every single application will have an 'undo' option where they should be able to 'undo' the 'cut' and get their text back if something goes wrong with 'Edit Anywhere.' Now, as soon as we have cut the text, we save it to the file ~/.edit_anywhere.txt using pbpaste which is Apple's command line tool showing the contents of the pasteboard. Normally that file should not exist (we'll see why in a moment), but what if it does? Should we just overwrite it with the new content? Absolutely not, that might be leftover text that the user had forgotten was there. Instead, if the file exists, we'll append the new text to the file and then open it. That might give the user a moment of confusion, but it's easy enough to remove the text they do not want, certainly much easier than trying to recover overwritten information! Once the information is safely stored in the file, we will try to open it with /usr/local/bin/bbedit which is BBEdit's command line tool. (N.B. if you wanted to use a different tool other than BBEdit, this is the line you would want to change to something else such as open -W -n -F *YourAppNameHere* "$FILE" but then you would need to add a way to switch back to the proper application after you finished editing, and you would have to quit YourAppNameHere instead of just closing the window, which is all BBEdit requires. BBEdit's command-line tool is also smart enough to activate the proper app after it is finished. You can see why I chose BBEdit, especially since it is already my preferred text editor.) What do we do if bbedit fails, or doesn't exist? The macro checks the exit code of bbedit and if it is not 0 then it checks to make sure bbedit is where it is expected. If it isn't, we inform the user. If it is, we inform the user that although bbedit is in the right place, it did not work properly. We also send the error message to stdout using echo which Keyboard Maestro will show the user because the shell script action is set to "display results in a window." Then we open the ~/.edit_anywhere.txt file in the default text editor, using open -W -t. (See man open for more details.) Assuming that bbedit does exist successfully, the shell exits and Keyboard Maestro will read the contents of the file back to the clipboard (we could have done that in the shell using pbcopy < "$FILE"). Then the macro will paste using the Edit -> Paste menu item, if available, or ⌘ + V. Finally we run another shell script. This one looks for the ~/.edit_anywhere.txt and moves it to the trash (~/.Trash/) but first it renames it using the current timestamp (YYYY-MM-DD–24h.MM.SS) and removes the leading '.' from the filename so it can be more easily seen if the user opens the Trash by clicking on the dock icon. This also prevents old versions from being overwritten in the Trash, in case the user needs to retrieve one for some reason. It's a start 'Edit Anywhere' isn't a perfect replacement for QuickCursor and, quite frankly, I'm still irritated that Apple failed to work harder to find ways to help developers make the transition into sandboxing. Too many good and useful apps have been either abandoned or forced out of the Mac App Store because of Apple's sandboxing implementation. That said, 'Edit Anywhere' gives me most of what I needed as an alternative. I've only been using it for a short while, so there may be some weird bugs and edge cases out there, but I've tried to make it so that the worst thing that would happen is that you have to open your Trash and grab a text file. That said, I can't guarantee that you won't run into problems, so use as your own risk.

  • One easy step to writing better bug reports

    by 
    TJ Luoma
    TJ Luoma
    08.03.2013

    As someone who uses a lot of different software and tends to find a lot of 'edge cases' I often find myself emailing software developers or filling out support tickets to either ask a question or report a problem. I know it would be helpful to include information about my Mac (both the hardware and the operating system) as well as precise information about the version of the software that I'm using. But, to be honest, I'm often too lazy to include it. Instead I tell them that I'm using the "latest version" of Mac OS X and the "latest version" of their software. But am I? Not too long ago I realized I was running 10.8.2 on a Mac that I thought was up to date. Or what if the developer comes across my email again in a month and can't remember what version was current then? They might think "Oh, well I think I fixed that since then" but if they have the exact version number for their app, they could find out much more easily. Which is so say: sometimes developers can be lazy too. So I came up with an easy way to include the information without requiring much work. How it looks With my script or Keyboard Maestro macro, I can automatically grab the version information for a specific app, as well as relevant information about my hardware and operating system. Here's an example of what the output would look like: (Note: I'm just using Fantastical as an example of an app, not suggesting that it's buggy. In fact, I don't think I've ever run into a bug with it. If that doesn't show up properly for you, checkout this direct link instead.) How it works bugreporthelper.sh is a shell script that you can use in Terminal. Just type bugreporthelper.sh and it will ask you if you need information about a specific app. If you say yes, it will include version information about the app. Either way it will output relevant information about your hardware and operating system. Bug-Report-Helper.kmmacros is a Keyboard Maestro macro which will do the same thing without requiring that you be in Terminal. It will prompt you for the name of the App (or PreferencePane) and look for version information. It will also insert your relevant hardware and operating system information. Installation bugreporthelper.sh - install anywhere in your $PATH and make executable (chmod 755 bugreporthelper.sh) Bug-Report-Helper.kmmacros - import into Keyboard Maestro (be sure to customize the keyboard shortcut and any other trigger you might want to add.) Notes The Keyboard Maestro macro tries to determine whether or not it can 'paste' the output of the command into the current application. If it can, it will do so and then restore your previous clipboard (whatever was on there before this script ran). If it can't, it will display a notification alerting you that it couldn't paste it, and keep the info on the pasteboard for you to manually paste wherever you want it. The method for determining whether or not it can paste depends on a menu item 'Paste' being enabled. Which is to say that it is not foolproof. Let me know if it behaves particularly badly in a particular app. bugreporthelper.sh will ask whether or not you want the information added to the clipboard. It will also save the information in a temp file (either in $TMPDIR or /tmp).

  • Terminally Geeky Time Tracking via Screenshots

    by 
    TJ Luoma
    TJ Luoma
    08.02.2013

    A few weeks ago I shared this on Twitter: "Here's an eye-opener: a @keyboardmaestro macro which takes a screenshot every 30 seconds. Review at the end of the day to see where it went." Since then, several people have asked me to share my setup (and a few said it terrified them). It took me a while to refine it, but I think I finally found a setup that will work for me. The "Why" The problem is simple: at the end of the day, I often feel like I accomplished a lot, but can't remember everything I worked on; or, I feel like I was busy all day, but don't have much of a sense of what I actually did. In both cases, it would be helpful to be able to 'rewind' my day and be reminded of what I did. The big problem is distractions, either internal or external. I find myself going from task to task sometimes without taking as much time as I should to leave myself enough breadcrumbs to get back. I'll start working on one thing, and then remember something else, then someone else asks for something, and in the midst of that something else comes up, and before you know it, the day is gone, and I've spent the day working on things that might have been important (or might not) but never made it to my "to do" list. I can't cross them off as 'completed' and I can't remember what I needed to go back to later. Another problem is remembering not only what I did, but how much time I spent on each. Saying that I worked on a given project is one thing, but being able to see that I spent 20 minutes on this project and 2 hours on some other diversion is much more useful. "Have you tried..." I've tried lots of different ways of keeping track of my time before this. I've tried keeping a piece of paper at my desk that I would use to write down everything I did. That worked great... when I remembered to do it. Most of the time, I didn't. I've tried Day One, I even wrote a script that automatically prompted me to write down what I was doing every 15 minutes. But that just meant more interruptions. I tried making it less intrusive (a Growl notification prompting me to make a note in Day One) but that was still a distraction, and I still didn't do it most of the time. I've even tried apps specifically for time tracking, such as the excellent TimeSink. If you're interested in tracking your time and want something that looks nicer and works more easily than my setup, I would suggest trying out TimeSink. You can demo it for two weeks, and there's a 60-day money-back guarantee. Just because I took the nerdy route doesn't mean it's a better way for everyone. I needed a system that was simpler (requiring no effort to use) as well as more precise, giving me the information that I need to be able to recreate my path through the day. Set It and Forget It My solution involves a shell script and Keyboard Maestro which should come as a surprise to exactly no one. There is a way to do it without Keyboard Maestro, but it lacks some of the features. I will explain that more at the end. The basic concept is simple: Every minute, the computer takes a screenshot and saves it to a specific folder with a specific filename. The process is completely automatic and silent, no distractions and nothing to remember. At the end of the day (or anytime during the day), I can look back through the screenshots and piece together my day. After the initial setup, I don't have to do anything to anything to maintain it. By default, the script keep 7 days' worth of screenshots, but you can easily change that. Why I like this setup I find this more helpful than just knowing how long I spent in a particular app because I could have spent 2 hours in Safari doing actual research or I could have spent 5 minutes doing research and the rest of the time chasing rabbits across Wikipedia. I could have spent 30 minutes in BBEdit working on an article, or I could have spent 90 minutes in BBEdit creating a shell script that will save me 10 seconds. And so on. Having a screenshot library of the day also means that I have a chance of remembering things based on vague visual memory. I often myself wishing I could go back and find something that I read online, but can't remember if it was Twitter or Tumblr or RSS or something else. "If I could just see it again I'd remember it." If I was looking at it for more than a minute, I have a screenshot of it. I Once a minute isn't frequent enough to catch everything of course, but it is the digital equivalent of breadcrumbs, and it's a good place to start. I've experimented with shorter and longer times but I keep coming back to one image per minute. I have also added a second script which is triggered whenever an app takes focus, more on that below. Two Options This script was originally designed to work with Keyboard Maestro for the simple reason that it works better in Keyboard Maestro. The script can provide more information coming from Keyboard Maestro, and Keyboard Maestro can also automatically detect when the screensaver is running or when your Mac's display is turned off. That means that Keyboard Maestro can prevent the script from taking a screenshot when all you're going to get is a blank screen.[1] That being said, I realize that some people can't or won't go for Keyboard Maestro, I have added a second option using launchd. (Note that you should only choose one of these options, not both.) Screenshots will be saved to $HOME/Pictures/screenshot-journal/. Inside that folder a new folder will automatically be created for each day. The format for those folders is YYYY-MM-DD which makes it easy to sort them in Finder. Option #1: Keyboard Maestro Setting this up in Keyboard Maestro is simple. (Note: I've only tested this with Keyboard Maestro version 6, but it may work with 5). Download screenshot-journal.sh Save it somewhere in your $PATH such as /usr/local/bin/ Make sure it is executable (chmod 755 screenshot-journal.sh) Download SSJ-Timed.kmmacros and double click the file to import it into Keyboard Maestro. (Optional) Download SSJ-App-Switch.kmmacros and double click the file to import it into Keyboard Maestro. (You can see screenshots on Github if you want to verify they imported correctly.) By default the Keyboard Maestro macro SSJ-Timed.kmmacros is set to run once every minute when you are logged, all day long. You can adjust that in the Keyboard Maestro Editor. You can have it run every "X" minutes or seconds, and you can tell it to only run during certain hours, i.e. maybe you only want to track what you do between 9:00 a.m. and 6:00 p.m.[2] The macro SSJ-App-Switch.kmmacros will run whenever a new app 'activates' (in Keyboard Maestro parlance, aka "takes focus"). This is an optional step which result in more screenshots being taken, but the end result is more complete reconstruction of your day. It's possible that you might switch to an app, write yourself an important note, and then switch back again before SSJ-Timed.kmmacros runs. N.B: If you want to be able to track specific websites such as Facebook, I highly recommend creating Site Specific Browsers using Fluid and then use Choosy to automatically direct clicked links to those browsers. I wrote about this in A better Google search experience with Choosy, Keyboard Maestro and Fluid and Protect yourself from being tracked by Google, Facebook, and others. Filenames when used with Keyboard Maestro When using Keyboard Maestro you will get much more descriptive filenames which will include the name of the current front-most app and the current document title (if any). So, for example, here is one of my most recent entries in today's folder: 15.18.02 [MultiMarkdown Composer] {TUAW.md} timed.gif The first set of numbers is the current time (Mac OS X's filesystem does not like colons in filenames, so I use "." instead.) The [brackets] contain the name of the front-most application and the {braces} contain the name of the front-most window, both of which are recorded by Keyboard Maestro. So, even before I look at the image, I have some idea of what it will show me: it's a screeenshot of when I was writing an article for TUAW using MultiMarkdown Composer. The word 'timed' means that this screenshot was taken by SSJ-Timed.kmmacros. Here is a similar screenshot taken from when I switched to MultiMarkdown Composer from another app 15.37.48 [MultiMarkdown Composer] {TUAW.md} switch.gif You will notice that this filename ends with "switch" (instead of "timed") indicating this screenshot was taken by SSJ-App-Switch.kmmacros. The filenames are designed to be easily sorted in Finder (which will sort them chronologically due to the timestamp as the first part of the filename), as well as easily parsed later on if you want to just find certain apps or certain window names. (Unix note: the whitespace between the fields is one tab followed by one space.) Option #2: launchd If you can't / won't use Keyboard Maestro for some reason, you can use this script from launchd. Download screenshot-journal.sh Save it somewhere in your $PATH such as /usr/local/bin/ Make sure it is executable (chmod 755 screenshot-journal.sh) Download com.tjluoma.screenshot-journal.plist and move it to $HOME/Library/LaunchAgents/ Either restart/logout or load the plist manually using launchctl Those five steps are required. There is one additional optional step: Download beengone, a free program from our very own Brett Terpstra which will tell you how many minutes the user has "been gone" from the computer. If beengone is installed, screenshot-journal.sh will use it to check to see if the computer is idle. (You can even set the number of minutes before the computer is considered idle just by editing one line in screenshot-journal.sh. By default it is 5 minutes.) Using launchd means that you will not be able to add the current app and current window name in the filenames of the screenshots, or take a screenshot whenever you switch apps. For that reason I highly recommend Keyboard Maestro over launchd but I include it as another option. What happens if the computer is idle? If you are using either Keyboard Maestro or beengone (meaning the script can tell if you are idle), you can use imagesnap to get an image captured from the iSight/FaceTime camera on your Mac, if it has one. I added that so I can see if I was on the phone, or talking to someone in my office, or just not in my office, any of which might provide a clue as to what I was doing when I wasn't using the computer. If you don't have imagesnap installed, no image will be captured when the computer is known to be idle. What to do with this information There's no reason to keep track of this information if you're not going to review it. I suggest taking some time at the end of the day to go through the folder of images. A good way to do this is to find today's folder in $HOME/Pictures/screenshot-journal and change to "Cover Flow" (either by pressing ⌘ + 4 or select the "View" menu item and then the "as Cover Flow" option). Then you can use the up and down arrow keys to move through the images, and press the spacebar to take a closer "quick look" view at any particular image. It may also be helpful to group images into folders describing each task, especially if you tend to go back and forth between tasks during the day. Putting all of the images together into one folder will give you an easy way to see how long you spent on a particular task. I was surprised to find that on a day when I thought I had "barely checked email" I had actually spent over 40 minutes in my email client, which might not seem like a lot, but was far more than I would have guessed. I also learned that during the course of one day I worked on about 30 different "projects" but didn't work on any of them for very long. Most of them maxed out at about 20 minutes. But what surprised me the most was that I had switched between tasks so frequently that I was often touching three different "projects" in the span of 20 minutes, or less. But at least there was only one image in the "Facebook" folder (and it would have been zero except I had been "tagged" in an image and wanted to see what it was). I don't plan to go through every day and make those folders, but it seems like a useful thing to do occasionally, especially if I'm having one of those "How did it get to be 8 p.m. already?!" days. Hard drive and CPU usage On my 2.13 GHz Core 2 Duo MacBook Air, I do not even notice when the script runs, even when I had it running every 30 seconds. One day I had about 15 hours worth of images, with a new image every 30 seconds and it took about 160 MB of hard drive space. After reviewing the images, there's no real need to keep them, so you can just trash the entire folder. The script creates GIF images to minimize disk usage. Obviously if you have a retina MacBook Pro, those images will be larger, but again, this isn't intended as long term storage. By default, the script will move old folders to the trash after 7 days. You can change that by editing the line DAYS_TO_KEEP='7' in screenshot-journal.sh. Similarly, by default, images will be stored in "$HOME/Pictures/screenshot-journal/" (with sub-folders created using YYYY-MM-DD). You can change that by editing the line: DIR="$HOME/Pictures/$NAME/" ($NAME refers to the name of the shell script without the path or extension.) While it is pretty easy to check to see if the screen saver is on in a shell script (ps cx | fgrep ' ScreenSaverEngine'), I have not found any way to determine the status of your display(s) from a shell script. So if you have Keyboard Maestro, you will definitely want to use it for this. If you don't have it yet, I encourage you to download the demo and try it for 30 days. ↩ There is one more which is optional, but highly recommended. Download this launchd plist and move it to $HOME/Library/LaunchAgents/. That will ensure that the Keyboard Maestro Engine stays running even if it crashes. If you do this be sure to go into Keyboard Maestro.app's preferences and turn off the option to "Launch Engine at Login" (as shown in the image here), otherwise you will get two copies of the Engine trying to start at the same time, which is bad. ↩

  • Quickly add new Tweetbot mute keyword using Keyboard Maestro

    by 
    TJ Luoma
    TJ Luoma
    08.01.2013

    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 Screenshots Keyboard Maestro comes with an item to "prompt user for input" and allows you to easily customize it. Here's what mine looks like: Screenshot #1 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: Screenshot #2 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. Important Note 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. Why Tweetbot? I've always been a big fan of Twitterrific but it doesn't have muting on the desktop yet, so I'm using Tweetbot, which is quite nice. You should be able to adapt this process to any Twitter client. 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 If you'd like to download my Keyboard Maestro macro you can find it on Github.

  • Using Keyboard Maestro 6 to automate a web database

    by 
    TJ Luoma
    TJ Luoma
    07.18.2013

    One of my favorite new features in Keyboard Maestro 6 is the ability to click on links in web pages using either Safari or Google Chrome. This new feature let me make an old macro (which was based around trying to click in the right place) a lot more efficient. I'm going to show you how I set this up. Although you probably won't be using this same web database system, chances are good that you could encounter something similar to it. My hope is that this will help people who are unfamiliar with Keyboard Maestro (or macro programs in general) understand how they might use automation to help make their computing lives a little easier. "What can't be automated?" Every week I log into EBSCO, a web database of journal articles. I put in my search terms or follow links from TextWeek - another site which has indexed articles by topic and links to EBSCO. That takes me to a summary page for the journal article which gives me publication information. I go through the results and find the articles that I want to read. There is no practical way to (usefully) automate that. I could probably find some way of fetching all of the results for a specific topic, but that wouldn't really be very useful. It's not exactly the stuff of summer blockbuster movies, but I rather enjoy it. The automation part kicks in when I actually find something that I want to read. Automate the tedious stuff Once I find an article I want to read later I have two options: I can click through and read the PDF through the site itself. This is invariably a lousy experience. The PDF ends up being loaded into one part of the screen, surrounded on three sides by parts of the website interface. I can save the PDF to my Downloads and/or open it in Preview, but it's all very clumsy and inefficient, as anyone who has used any sort of web database like this can attest. I can email the PDF to myself. In fact, I can email the PDF to myself and get a copy of the bibliographic information including a link back to the original in case I ever need to find it again. That's much nicer. Well, at least, theoretically. In practice, it's still fairly clumsy and inefficient. I have to click the "E-mail" link on the side of the page, as shown in the image below: There's no keyboard shortcut for that link, of course, which means I have to use the mouse. Or do I? Actually, with Keyboard Maestro 6 I can assign a keyboard shortcut to clicking links, and so I have set ⌘ + Y ("Y" as in "Y"es I want to read this article, but also because the key combination wasn't in use by Safari). When I press ⌘ + Y, Keyboard Maestro will click that link for me. But we're just getting started. Clicking that "E-mail" link doesn't actually email the PDF to me. In fact, all it does it open another AJAX/JavaScript pseudo-window with several additional fields: my email address. Yes, every time. No, it never remembers it, no matter how many times I've typed it in before. A Subject: line for the email. You might think that the title of the article I am reading would be automatically filled into the Subject: field, but you would be mistaken. A checkbox for sending the bibliographic information in plain text instead of HTML. You have probably already guessed that I'm not filling all of that in by hand, so you're probably expecting that I'm going to create another macro, right? Wrong! I don't need another macro, I can still use the one I've already created. Macro Step 1: "Click 'E-Mail' link" Macro Step 2: "Wait until 'Send' button appears (in that JavaScript/AJAX pseudo-window). Macro Step 3: When that button appears, press Tab twice to get to the "Email to" field. Macro Step 4: Fill in my email address (remember this part later) Macro Step 5: Press Tab again and enter the Title of the Safari window (which Keyboard Maestro can easily do) into the Subject: field Macro Step 6: Press Tab two more times which will put me on the checkbox for 'Send in plain text format' Macro Step 7: press Space to toggle the checkbox Which gives me something like this: Let's look at those steps again. Are any of them difficult? No. But how many times would I accidentally make a typo in my email address? Or tedious would it be to keep copying and pasting the Title: into the Subject: field versus the 0.01 seconds it takes the computer to do it automatically? How many times would I accidentally paste the Subject: into the 'Comments' box? Or forget to check the 'Plain Text" box? Macro Step 8: click that "Send" button Now we're done, right? Aha, you're catching on. We're not quite done. After the email is sent, there's a confirmation window: Macro Step 9: Pause until the "Continue" button appears, then press it. Now here's another little detail: sometimes I will open a bunch of tabs, and each tab is a different article, so when I am done, I want to close the tab because there is nothing more to do with it. However, other times I will click through from the search results and the article loads in that same page. If I close the tab there I will lose my search results and have to go back and start over again. Fortunately, there is an easy solution. Macro Step 10: If Safari's menu option "History » Back" is enabled, select that menu option and take me back to the search results, but if that menu option is not enabled it means that this article was opened in its own tab. Keyboard Maestro can do this easily. Just fill in the blanks: How many times would I accidentally choose the wrong one? Knowing myself, a lot. Sure, it should be possible to just re-open the last tab, but it doesn't always work that way, especially when working with database queries. If I was to do each of those steps myself, it would take about 20 seconds for each page, assuming that I never made a mistake. (Even that is cheating because I have a TextExpander macro for my email address.) It takes Keyboard Maestro between 2–3, and most of that time is actually waiting for the server-side actions to happen. This morning I found 15 articles that I wanted to read: 20 seconds times 15 articles is about 5 minutes. To me there's a bigger factor than the time saved: the convenience. Having this process take just a few seconds instead of a few minutes means that I can keep my focus on what I am doing. That means more attention on the parts of the process that can't be automated: the searching and the reading. More time and energy to do the parts of the task that I want to do and enjoy, and less time and energy spent on the boring parts that the computer does faster and more precisely anyway. One more thing... Maybe two... Remember "Macro Step 4: Fill in my email address"? There's actually a 'trick' to that part too. Because I'm having the computer do the typing anyway, I actually have it send each article to two email addresses (separated by semi-colons, not commas... Why? You'd have to ask EBSCO). The first is my regular Gmail address where the article gets filtered away "just in case." The second email address is a SendToDropbox.com address which I specifically use for these kinds of articles. I don't know what kind of black magic they are using over there at SendToDropbox, but by the time I have closed the tab or gone back to the previous page in Safari, Dropbox is already downloading the files that I have emailed to myself. SendToDropbox can automatically sort the files by date (which is handy since that will, effectively, group them by topic for me since I generally search for one topic per day). Of course I can't stop there, so I have Hazel at that folder which does some even nerdier things to the files that SendToDropbox creates. The point isn't to do what I have done... As I said at the beginning, chances are you don't use the same database to lookup journal articles... But what do you do on a regular basis that could be automated? Are there parts of something that you do over and over again that you find really tedious that the computer could do for you? These automation tools – Keyboard Maestro, Hazel, TextExpander – won't make you think that you are living with The Jetsons, but they can smooth out rough edges in your computing life, making it less frustrating and more enjoyable. That's why automation continues to be a big focus for me as I look for the "little things" that add up to a better experience using my Mac.

  • Use Keyboard Maestro to get ready for podcast recording

    by 
    TJ Luoma
    TJ Luoma
    03.12.2013

    When you're in the middle of recording a podcast, chances are you'd like your Mac to be focused on that job -- not other network-hungry activities like syncing Dropbox, or CPU- and disk-intensive tasks like saving a Time Machine backup. Gabe at Macdrifter wrote about his Pause TimeMachine Macro, which he uses when he starts using Skype. He adds that he knows there are other (potentially "better") ways to do this, but that his was just a fast-and-dirty solution. Seeing Gabe's macros reminded me that I wanted something like this for when I am recording the Impolite Company podcast. Gabe's macro enables and disables Time Machine, but I also want to enable and disable CrashPlan and Dropbox. Like Gabe, I have a tendency to forget to turn things back on, so I wanted to automate this as much as possible. Since I tend to only run Skype when I am actively recording a podcast, I decided to trigger my macros around the Skype.app either launching or quitting. So I wrote two Keyboard Maestro macros: one for when Skype starts and one for when Skype quits. Prepare For A Podcast My first new Keyboard Maestro macro is called (wait for it) "Prepare For A Podcast". This is what it looks like in Keyboard Maestro: Translation: In Keyboard Maestro's language, this is what the above means: Whenever Skype launches, Keyboard Maestro will automatically do the following: 1) If a file exists at /Library/LaunchDaemons/com.crashplan.engine.plist (which is where CrashPlan's launchd file is stored) unload that file (which will disable CrashPlan) via AppleScript: do shell script "launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist" with administrator privileges n.b. "with administrator privileges" will prompt the user for their password. Also note that I am using Growl notifications to tell the user what is happening, especially when a password is being requested. 2) Likewise, disable Time Machine with another bit of AppleScript: do shell script "tmutil disable" with administrator privileges 3) If Dropbox is running, quit it. 4) Open the "Sound" preference pane (which I want so I can make sure that my USB mic is configured properly for Skype). Resume After A Podcast What happens after a podcast is pretty much exactly the opposite: Translation: This macro will be triggered automatically whenever Skype quits, and this is what it will do: 1) If the plist is found, load it into launchd: do shell script "launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist" with administrator privileges 2) Resume Time Machine: do shell script "tmutil enable" with administrator privileges 3) If Dropbox is not running, launch it via shell script: open -a Dropbox Download As with Gabe's macros, I am sure that there are other (potentially better) ways to do this, but I hope that this might be useful to others. These macros assume that you don't generally leave Skype running for general use, but that you only launch it when it's podcast time. To download my Keyboard Maestro macros, you can either check them out at Github or right (control) click on the links below: prepare-for-a-podcast.kmmacros resume-after-a-podcast.kmmacros

  • A better Google search experience with Choosy, Keyboard Maestro and Fluid

    by 
    TJ Luoma
    TJ Luoma
    02.19.2013

    There are so, so many things that annoy me about Google: Google can remember everything about me except that I want my search results to open in a new window. Google crappifies search results, so that instead of giving me a link to the site that it shows me, it actually gives me a link to Google itself which will redirect to the site. This makes copying the link a giant PITA as well as being slow.[1] Google insists on showing me all of this "other stuff" that it thinks I want to see, when, in fact, all I really want to see is the search results for what I looked for. Because it is loading all of this other crap, it's slower than it needs to be, and my home satellite connection is slow enough. Google tracks everything you search. Now, my searches are pretty mundane, but I don't necessarily want every search tied to my Google / Gmail account. Sure, I could logout of Google / Gmail but that's annoying too. Then there are two problems which aren't Google's fault, but still annoy me: Safari 6 insists on using SSL to do searches, which often fails on my home Internet connection which is satellite. I cannot find any way to disable that. Safari 6 makes it impossible to see the actual URL for Google searches made from the "Unified Smart Search Field." What I want is a really fast, efficient, anonymous search, where the results will be direct links to the sites in question. And then I want those search results to open in a new window. I realized that I could build exactly what I wanted, using tools that I already own: Keyboard Maestro Choosy Fluid (Spoiler alert: If you want to use a search engine such as DuckDuckGo instead of Google, you can use the same process I am going to describe below.) Fluid Fluid is one of my favorite apps in my "toolbelt" for making a better experience on the web. Fluid describes itself as a way to 'turn your favorite web apps into real Mac apps.' Fluid is best-known for making "site-specific" browsers, but it is also great for making a browser with specific settings, including turning Java/JavaScript/Plugins/Cookies on or off. If you spend US$5 you can create site-specific browsers with separate cookies which is not-essential-but-nice for what I'm going to do here. (There are other features you get for your $5. See the site for more details. It's easily worth $5 even without these bonus features.) Here's what I did in Fluid.app: 1) I created a new browser called 'Google Search' and set the homepage to http://www.google.com. A few seconds later, Fluid told me my new browser was ready, and I launched it. Note: for some reason Fluid.app doesn't find a good icon for Google, so I searched for Google Logo icon 512 and found this one that I like and selected it in the 'Icon' field, shown above. You can change this at any time later, so if you don't want to do it now, or if you forget, don't worry. 2) As soon as my "Google Search" app launched, I changed the "User Agent" to report itself as an iPhone. (Aside: the "user agent" tells the website you are visiting which browser you are using. If you've ever gone to a website on your iPhone and found yourself automatically redirected to a 'mobile friendly' page, it's probably because that site saw your 'User Agent' said that you were using an iPhone. If you want to see what your user agent shows, you can check your browser user-agent here.) I want Google to think that I'm using an iPhone, because Google's search results are much 'cleaner' for iPhones than for regular browsers. In the 'Google Search' menu, I selected "User Agent" and then the iPhone option, as shown here: You might occasionally find that your search results direct you to a mobile version of a website, but that's a minor issue. Often times if you actually click on the link it will redirect you automatically to the 'full' version once it sees the user agent of your regular browser. 3) Under "Whitelist Preferences" I made sure that the only allowed URLs were for www.google.com not any other Google domains: This means that any link I click on will not open in this new browser, but will be fed to my usual browser. Clicking on Google results will finally open in a new tab. In fact, they will open in another browser. 4) Under "Security Preferences" I turned off plugins, Java, JavaScript. Why? Because I don't need any of them, and disabling JavaScript will also disable Google "instant" which I don't like either. I set "Accept Cookies" to "Never" and set "Cookie Storage" to "Separate from Safari" (so I don't have to log out of Google to not have Google associate my searches with my Google account). Changing the 'cookie storage' setting requires restarting my "Google Search" app, which I did. Choosy Choosy lets you create 'rules' for which browser should be used in different circumstances. I've written about Choosy before so I won't go into more detail here. The app hasn't been updated for a few years, but it still works just fine under Mountain Lion. Under Choosy's 'Advanced' tab, I created a simple 'rule' to send all links which contain 'google.com' to my 'Google Search' browser. You can see the rule here: Make sure that Choosy is set as your default browser. The easiest way to do that is in Safari's preferences. You can easily set Choosy's preferences to use your regular browser unless a specific rule is matched, so you'll never even notice that it is installed. (I would just like to mention that I have written about Choosy twice now and not made any Jif-related jokes about how "Choosy Mac users choose Choosy." Wait! Oops. Too late.) Keyboard Maestro My admiration of Keyboard Maestro continues to grow the more I use it. I recently wrote about the automation mindset but this time I wanted something much simpler: a quick way to bring up a Google search window. Previously, when I had wanted to search for something in Google, I would switch to Safari, create a new tab, and then start typing in the "Unified Smart Search Field" which was really only convenient if I was already in Safari. I wanted something better: anytime, anywhere, in any app, I want to be able to press a keyboard shortcut, get a prompt, type, press enter, and have the Google search results come front and center. Keyboard Maestro makes this so easy I can't believe it has taken me this long to do it. 1) Create a new macro in Keyboard Maestro and name it whatever you want. I recommend "Google Search" because I'm extremely creative. 2) Click "New Action" Type 'web' into the 'Action' search area (top left of image, above) and select 'Search the Web.' Notice that the option is not called 'Search Google' – it's Search the Web. It defaults to Google, but you can change that simply by changing the URL. For example if you wanted to use DuckDuckGo you would use http://duckduckgo.com/?q=%Search%. However, make sure that your Fluid.app browser and your Choosy rule are using that domain too. You might also notice the 'color picker' which is used for the background color of the window that Keyboard Maestro will create: I like the default but it's a nice touch to be able to change it. OK, this is my favorite part of this entire tip: I never (intentionally) use the Caps Lock (aka CHOCKLOCK) key. In fact, I only ever hit it my accident. One of my favorite features of OS X was when Apple decided to let us kill the Caps Lock key by going to System Preferences.app » Keyboard and then choosing "Modifier Keys...": Google, Inc. made some headlines when it decided not to include a Caps Lock key in its CR–48 netbook, instead using that key for a 'Search' function. I thought it was a great idea, and so I decided to replicate it on my Mac. The first step is to set to the Caps Lock key to "No Action" as shown above. Then go back to Keyboard Maestro, and click the plus sign (+) next to "New Trigger" and choose "Device Trigger" as shown here: Here's where you have to be a little careful: as soon as you select "Device Trigger" you should press the Caps Lock key, because if you press anything else including the trackpad or mouse button Keyboard Maestro is going to think you want to use that as the trigger. After pressing the Caps Lock key it should look something like this: Note that if you use another keyboard (such as a Bluetooth keyboard connected to your Mac laptop) you should add a second 'trigger' for Keyboard Maestro using the Caps Lock key on that keyboard as well as the "internal" keyboard. Putting It All Together Now whenever I want to do a Google search, I press the Caps Lock key and type into the window. The results open in my Google Browser, and when I click on a link, it opens in my regular browser. If I want to go back to my search results, I just switch back to that app. Although this takes a bit of initial setup, the payoff is well worth it for a better experience in the end. I have not done this yet, but you could also repeat this process for different search engines and add modifier keys (shift, option, control, command) to have Keyboard Maestro bring up different search prompts. I plan to make one of those for Google Images and Google News, both of which I search frequently. Google icon at the top of this article courtesy of YOOtheme. If you want to keep using Safari for Google searches but want to avoid these Google-crappified links, try the Google Direct extension ↩

  • Lingon and launchd can keep crucial apps always running

    by 
    TJ Luoma
    TJ Luoma
    10.30.2012

    Two years ago I wrote about a shell script that I used with cron to keep 'critical' applications running. Some of the commenters suggested that I "should" be using launchd. There are times when I still prefer cron over launchd but there are two reasons why I have started using launchd more often. The first is Lingon, and the second is learning more about what launchd can do. Lingon & the Mac App Store: A Mini-Rant Lingon 3 is a US$3 app which makes writing and managing launchd plists easy. Lingon has been a 'nerd tool' for a long time. A long time ago there was a version available for free. When the Mac App Store opened, Lingon 2 was released for $US5. This naturally enraged some people who believe that software developers have the ability to feed themselves on sandwiches made from air and good feelings. To make matters worse, Lingon ran into the new "sandboxing" restrictions for the Mac App Store. Briefly stated, sandboxing rules now limit what any Mac App Store application can do. These restrictions are imposed by Apple for other developers, even though Apple allows its own software to do many things which aren't possible with sandboxing restrictions. If you have noticed apps leaving the Mac App Store recently, there's a good chance sandboxing is the reason. Sandboxing is a good idea, but right now it is so restrictive that it is causing more problems than it solves. Hopefully this situation will get better as Apple increases what sandboxed apps can do, but for now developers are left with little choice. Peter Borg, Lingon's developer, was faced with a choice: either neuter Lingon 2 to fit sandboxing requirements, or release a new version of Lingon. This was a bit of a "no-win" situation that many developers are facing. Updating Lingon 2 to comply with sandboxing requirements would mean that users who had purchased Lingon 2 and then updated to the newer version would lose features they had paid for. Creating a new version of Lingon would allow the developer to make sure that it complied with sandboxing requirements, but customers who bought Lingon 2 would have to pay for Lingon 3 because the Mac App Store does not have any way for developers to offer upgrade pricing to existing customers. He chose to make a new version of Lingon (version 3) priced at $3 instead of $5, which makes sense because it could do less than Lingon 2. For those who still want Lingon 2, it is still available as a separate app. Despite having made a reasonable choice between two less-than-ideal options, the Mac App Store reviews call it "horrible" and "useless" for not having the features that Apple won't let the developer include. All of which is fairly ridiculous, especially when you realize that you're talking about two versions of an app which, together, cost $8. launchd, KeepAlive, and SuccessfulExit Apple released launchd as part of Mac OS X 10.4 ("Tiger") in 2005, and has steadily improved it ever since. There is no shortage of documentation for it, including Creating Launch Daemons and Agents and the launchd.plist Manual Page, but it's easy to get overwhelmed with the amount of information available. Personally, I find it a lot easier to look at working examples, and see how and why they work. Here's a fairly generic template that I created for you to use: If you want to use that, click/tap on the 'raw' link and it will load in your browser, then save it to your computer. To modify it, just change the two parts written in ALL CAPS. Replace "YOUR.NAME.HERE" with anything you want. It just has to be unique on your system. The "KeepAlive" key tells launchd to restart the process if it stops for any reason. This ensures that the program will be available all the time, but there's a problem: what happens when there's a new version of the app and you want to install the update? You can quit the app, but launchd is just going to restart it. That's where SuccessfulExit comes in. By setting that to 'false' we are telling launchd to only restart this program if the app does not exit successfully. So if you quit the app yourself for some reason, launchd assumes that you want to keep it off until you restart the application, reboot your Mac, or log out and then back in. Then replace "/PATH/TO/PROGRAM/YOU/WANT/TO/KEEP/RUNNING" to the path on your system. Note that if you want to keep an app running, you have to include the path all the way to the executable file, not just the ".app" so if you wanted to keep Dropbox running all the time, the path would be /Applications/Dropbox.app/Contents/MacOS/Dropbox and not just /Applications/Dropbox.app! There are two other potential problems: Spaces in path names Sometimes what you want to keep running isn't obvious at first. I'm going to address both of those using a plist that I use to keep Keyboard Maestro's helper engine running: You'll notice that I don't want to keep Keyboard Maestro running. I want to keep "Keyboard Maestro Engine" running. If you aren't sure what the correct path is, you can go into Terminal.app and type: ps auxww | fgrep -i 'WORD' | fgrep -v fgrep Replace "WORD" with whatever word you want to search for: iTunes, Evernote, Hazel, etc. Look for words such as "Watcher" or "Helper" -- those are often the ones that you might want to keep running. If the path you find has spaces it in (like Keyboard Maestro Engine does), try it without using either quotes or back-slashes () first, and see if it works. If it doesn't work, try adding backslashes before each space or before any punctuation that isn't a period or a slash. Once you have your plist created, save it to ~/Library/LaunchAgents/ and then load it using launchctl load like this: launchctl load ~/Library/LaunchAgents/your.name.here.plist or just log out/reboot. Note: it is a good idea to use the same name for the filename as you chose for the label (YOUR.NAME.HERE) but make sure to add the ".plist" in the filename. Lingon makes it easier Now you know how to plists by hand, but I suspect most people would prefer an easier way. Enter Lingon. Launch Lingon and it will show you all of your existing launchd plists in ~/Library/LaunchAgents/: Don't be surprised if there several already in there. Click the plus (+) at the top-left and Lingon will prompt you to save: Now, I know it might seem counter-intuitive to have "save" be your first step, but you'll see why in a moment. Once you choose a name, Lingon will expand to show you this: Let's take a closer look at that front panel: Lingon has already filled in the "Name" field based on the filename you chose for the "Save As" command. Smart! Now you just have to choose what app or program you want to keep running. I'm going to choose Dropbox. Notice that I have only selected the Dropbox.app itself. "But wait!" you cry, "Didn't you say before that you need to select the app binary, not just the app wrapper?" Yes, I did. But Lingon is smart enough to add the "Contents/MacOS/Dropbox" even though I just selected Dropbox.app. See? Now that you have chosen a program, you need to tell Lingon when you want to run it. Note that I have chosen both "Keep Running" and "At login and at load." Now in my experience, I have not needed to to specify "At login and at load" but the launchd.plist Manual Page says that '[SuccessfulExit] implies that "RunAtLoad" is set to true, since the job needs to run at least once before we can get an exit status.' So I select both. Fortunately launchd is smart enough not to launch two of them. When you're finished, click 'Save & Load' and Lingon will show you your new plist in the list: Voilà! Point and click, with no editing of plist files, no need to drop into Terminal.app, and no need to come back to this page to copy that template that I showed you. Lingon 3 is smart enough to add the SuccessfulExit key and everything else you need. If you use KeepAlive, turn off 'auto-launch' If you do decide to set up a "KeepAlive" for an app such as Dropbox, be sure to go into that app's preferences and turn off the setting to auto-launch the app when you log in. For example, this is Dropbox's preference for that: The reason to turn that off is that otherwise launchd might start the app and it might auto-start on its own, and generally speaking it is not a good idea to run two versions of the same app at the same time. If you decide that you no longer want to use KeepAlive, either go to ~/Library/LaunchAgents and remove the file (and then log out/reboot), or launch Lingon 3, select the plist you want to remove, and select File » Delete Job.

  • Keyboard Maestro and the automation mindset

    by 
    TJ Luoma
    TJ Luoma
    10.01.2012

    Keyboard Maestro always sounded like a useful app, but I wasn't sure how I would ever use it. Now that I have it, I keep finding new ways to use it. I think Keyboard Maestro is perhaps one of the more difficult apps to explain, because how I use it might vary greatly from how you use it, but once you get to know how it works and some of the things it can do, maybe you'll see how you might use it. Some simple use cases for Keyboard Maestro At its simplest, Keyboard Maestro can do things like TextExpander where you type a few letters and have it expand to a much larger message, but that's really a narrow view of what it does. In fact, I prefer to use TextExpander for those sorts of uses. I use Keyboard Maestro for more complicate situations. For example, have you ever tried to add a bunch of iOS apps to an iTunes library, only to have iTunes warn you that some of the apps already exist? If you have, you know what follows. Each time iTunes finds a duplicate application, it will stop everything and ask if you want to replace the app until you press "OK" and then it will continue. Keyboard Maestro can wait until iTunes asks and then answer for you. I once left iTunes running like that and went to lunch, letting Keyboard Maestro do the menial work for me. Keyboard Maestro can trigger events to happen when an app quits or when it launches. For example, when SuperDuper launches, Keyboard Maestro automatically unmounts my Time Machine backup (because I don't want Time Machine to interfere with SuperDuper). When SuperDuper quits, Keyboard Maestro unmounts the SuperDuper clone (otherwise Spotlight tends to find apps and files on both drives) and remounts my Time Machine drive. When I am using Microsoft Word and have an open document, Keyboard Maestro automatically saves the file for me every 3 minutes, so I never have to worry about losing work. Mac OS X supports customizable keyboard shortcuts for menu items, but they have to include the Command key (⌘). With Keyboard Maestro, I can assign any keyboard combination I want, and if I accidentally use the same keyboard combination twice, Keyboard Maestro will pop up a menu and let me choose between the two of them. Putting several steps together As I mentioned, the key (no pun intended) to using Keyboard Maestro is to start getting into the mindset of thinking "Could I automate this?" whenever you find yourself doing something repeatedly. For example, I access a database of journal articles that are available to download as PDFs. I recently discovered that if I email those articles to myself, the database will include all of the citation information necessary. But emailing them is a bit of a pain. Each time I find an article I have to click on the 'email' button, which triggers some JavaScript which reveals a place where I can enter my email address. I have to type my email address, then I have to copy the title of the article into the Subject: line, then I have to check the box to say that I want the email to be "plain text plus the attachment", then I have to hit the 'Send' button. Once it is sent, I have to click 'Continue' to dismiss the alert that tells me the email was sent, and then I have to go back to the previous page in my browser history. All told there were twelve steps involved for each article, and some of those steps had multiple keystrokes involved, such as 'type my email address.' (Actually I was typing my Send To Dropbox email address, so the PDF and the email body with the citation would also get saved.) With Keyboard Maestro, once I decide that I want to save an article, I simply press one keyboard combination, and it does all of the necessary steps. It even brings me back to the previous page so I can continue searching. Not only does Keyboard Maestro do these s steps approximately 100 times faster than I could, it never accidentally misspells my email address, or hits the 'tab' key three times instead of two times, or forgets to check the box that says 'Yes, include the PDF in the email.' The end result is that I have more time to spend doing what I want to do (looking for interesting articles) and don't have to spend any time or mental energy on the boring, repetitive, easy-to-make-a-mistake parts. Do you install a lot of applications? As someone who tests a lot of software, I find myself running Installer.app a lot. Anyone who does this a lot knows that there are usually about 5-6 different screens that you have to go through from start to finish. Click install Click Continue Click Agree (to the EULA) Click Continue Installation Wait for it to finish Click Close If you've done that often enough, you know that you can press 'Enter' and 'Tab' (or Shift + Tab) to get through those, but it's a lot faster to have Keyboard Maestro do it for you. (You'll still have to enter your password manually, so don't worry about accidentally opening an installer and having something bad happen.) Do you make backups? I make backups of my calendar and contacts information every week. Well, at least I always intend to. But, well, if it relies on me remembering to do it, I probably won't do it. With Keyboard Maestro I can schedule this backup to happen automatically. So now, every Monday at 9:00 a.m. I get a Growl alert which says "Backing up Contacts" (which alerts me that it's about to happen so I don't accidentally interfere with it), then the Contacts app opens, and Keyboard Maestro selects File » Export » Contacts Archive... presses 'Save' when prompted, and then quits Contacts app. Then the entire process repeats with BusyCal. The whole process takes a few seconds, and all I have to do is wait. (Speaking of automation, I won't even mention that those backups are automatically saved to a particular folder using Default Folder X, and that once they are saved, Hazel automatically zips them and moves them to Dropbox. Oops. Well, maybe I'll mention it just a little.) Automation reduces annoyance Computers are great, but sometimes we have to do things that are repetitive and boring. Computers should be doing those repetitive and boring things for us. Keyboard Maestro makes it easy to get your computer to do some of those annoying things for you. All you have to do is figure out the parts that can be automated, and then sit back and watch as your computer works for you. OK, so Keyboard Maestro isn't exactly a robot butler, but it's still a step in the right direction. A demo is available from the Keyboard Maestro website, a full license is US$36. While that may seem like a lot to the "Apps should be $1! Or free!" crowd, those of us who value our time and satisfaction will see it as money well spent. Download the trial and spend some time with it. Don't dismiss it because there's a learning curve. Start small and figure out some little ways to use it, and then watch as you develop the automation mindset. Once you get used to thinking this way, you'll wonder why it took you so long.

  • Apptivate 2.0 adds keystroke sequence shortcuts

    by 
    TJ Luoma
    TJ Luoma
    01.18.2011

    There are a plethora of "launcher" apps out there. I've used LaunchBar ($35) since it was released for NeXTStep; other folks seem fond of Alfred (free, with additional powerpack for £12, or about US$20), Butler ($20), Keyboard Maestro ($36) or Google Quick Search Box (free). The venerable but now mostly-dead QuickSilver (cue moment of silence followed by someone yelling out "I'm not dead yet") is being kept alive by a band of merry coders who hope to revive it. Heck, even FastScripts and OS X's own Spotlight can serve as launchers. I come not to replace your favorite launcher, but to supplement it, with an incredibly handy $3 app called Apptivate. Read on for details

  • Ask TUAW: Syncing, custom keyboards, sharing iPhone apps, and more

    by 
    Mat Lu
    Mat Lu
    09.30.2009

    Welcome back to Ask TUAW, our weekly Mac troubleshooting Q&A column. This week we've got lots of questions about syncing, as well as customized keyboards, sharing iPhone apps, managing iTunes, and more. As always, your suggestions and questions are welcome. Questions for next week should be left in the comments. When asking a question please include which machine you're running and which version of Mac OS X (we'll assume you're running Leopard on an Intel Mac if you don't specify). And now, on to the questions

  • Keyboard Maestro 3.1 Orchestrates Macros

    by 
    Steve Sande
    Steve Sande
    05.29.2008

    Macros can save you a lot of time performing repetitive functions on your Mac. While Automator and AppleScript provide a lot of power, some Mac users want an easier way to capture their keystrokes, mouse clicks and other actions. That's where Keyboard Maestro comes in. This $36 gem from Stairways Software has just been updated to version 3.1, and adds a profusion of new features. While there's not enough space here to list them all, some of the highlights include: A clipboard history switcher An action to save a clipboard to a Named Clipboard Clipboard Filters Centering windows on the current screen Fractional second (i.e., .75) pauses Can add BBEdit Text Factories to the current clipboard Stairways also fixed some known glitches from the 3.0 release. A 30-day free trial is available for download and requires Mac OS X 10.4 or better.

  • Keyboard Maestro 3 adds macro recording and remote access

    by 
    Mat Lu
    Mat Lu
    04.09.2008

    The well-known macro application Keyboard Maestro has been updated to version 3 and adds some interesting new features. In addition to a revamped interface, the new release allows you to record macros (series of key presses, mouse clicks, etc.) and play them back via various triggers. There are also new ways to trigger the macros; besides the normal hotkeys, macros can also be triggered with AppleScripts and even remotely with Keyboard Maestro's built-in web server. If you've ever wanted to automate your Mac, it's definitely worth a look.Keyboard Maestro 3.0 is $36 with upgrade pricing from $18 - $26 for previous users; a demo is available.[via MacNN]

  • David Pogue on Macro programs

    by 
    Scott McNulty
    Scott McNulty
    08.23.2007

    NY Times tech columnist David Pogue has done it again. I'll admit that more than once I've wondered about David after watching one of his whimsical video reports for the Times, but then he offers up a gem like the one in his latest column and I realize why he is a powerful tech columnist and I'm a lowly blogger.Pogue takes a look at several Macro programs for both Mac and PC (a Macro program is one that allows you to assign certain actions to corresponding key strokes. Launch an app with a push of a button, have a script fire off, things of that nature). He takes Keyboard Maestro, iKey, and QuicKeys for a spin on the Mac side. They all fare well, but QuicKeys is the one the gets the highest marks, and the one that spawned the tip which has me believing in Pogue all over again. QuicKeys allows you to remap the tilde key (pictured to the right) to any button you would like. David uses it as a left hand delete button so he doesn't have to move his hand off the mouse whilst editing. Brilliant.

  • Keyboard Maestro 2.1 Universal

    by 
    Mat Lu
    Mat Lu
    07.22.2007

    Keyboard Maestro is a well-regarded keyboard macro application for OS X that lets you define and use a variety of custom keyboard shortcuts. Macros are basically scripts that can be used to perform a variety of actions, including manipulating on-screen windows, simulating mouse and keyboard buttons, controlling the clipboard, etc. Version 2.1 is Universal and includes several bug fixes. If you're interested in automating certain tasks on your Mac, or even over-riding keyboard shortcuts in certain applications, Keyboard Maestro's macros might very well do the trick.Keyboard Maestro is $20US and a demo is available.[via 123Macmini]

  • Ask TUAW: Video encoding, remapping keyboard keys, redirecting Mail, and more

    by 
    Mat Lu
    Mat Lu
    04.25.2007

    This week's Ask TUAW is wide-ranging. We have a couple of questions about video encoding, remapping keyboard keys, redirecting email, Finder window positions and more. Remember new Mac users and Switchers who are enjoying our Mac 101 series should feel very welcome to post questions for Ask TUAW. We're happy to take questions from all levels. As always, please submit your questions by commenting to this post or using our tip form.