6/08/2008
I’ve been using Yojimbo, for a long while now but Eystein has been pestering me to give Evernote a shot. Common for both of these is that you don’t want to spend any time when you’re dropping stuff into them. I want one key that’ll toggle the visibility of the app. I want to hit my hotkey, dump stuff in, hit my hotkey again and continue what I was doing. Of course, neither of these apps come with that functionality (Well. Yojimbo does come with a “Quick input”-window, but for some reason I never got to loving it.) so here’s an AppleScript to fix that.
Just change the name in the script to whatever app you want to target, create a Quicksilver trigger for it and Bob’s your uncle.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| on run
tell application "Finder" to set en to name of first ¬
process whose frontmost is true
if en = "Evernote" then
tell application "System Events" to set visible ¬
of process "Evernote" to false
set notHidden to false
else
tell application "System Events" to set visible ¬
of process "Evernote" to true
activate application "Evernote"
set notHidden to true
end if
end run |
I’m really enjoying messing around with AppleScript these last few days. For such a light-weight language the benefits of it commanding the OS are huge.
1/08/2008
Summary: In which Martin has created an AppleScript to remedy Firefox’ poor support for
OmniFocus‘ “Send to inbox” hotkey. This is a lengthy post with lots of dreary explanations, so you might want to
jump to the finished script if you don’t care about how stuff works.
Edit: An alternative version brings up your Quick-add dialog and populates it. Check this comment if that sounds more appealing.

To get this to work you’ll need Quicksilver. But you’ve got that haven’t you? Sure you do.
I’m trying out OmniFocus nowadays for my obsessive-but-not-GTD-level organizing needs. It’s still a tad overkill for what I need, but they have the best iPhone sync so far, and I assume I’ll just be assimilated into the cult of David Allen sooner or later so what the hell.
One of the things I like about OmniFocus is the “Create Clipping” functionality. OmniFocus allows you to at a keystroke (♥) send whatever text is currently selected to your Inbox as a clipping.
However this isn’t working in Firefox 3. Mozilla practically stripped all the scripting abilities in v2 and i suppose that’s what goes for a “feature” nowadays. This needs some serious fixing. Let’s get our hands not-really-dirty-but-maybe-a-bit-smudged.
Edit: I’ve updated the script with a new version that also grabs the URL of the clippings origin.
Read the rest of this article »
29/07/2008
A big pet peeve of mine is that unlike most other apps Mail.app is a goddamn hassle to just quickly switch to.
If you’ve closed the window in Mail rather than just hidden or minimized it, it seems to be no way to make it reappear with a keystroke. Instead you have to actually move your mouse to the dock and click the icon. Unacceptable.
The solution? Open your system preferences and navigate to the Keyboard Shortcuts tab under “Keyboard & Mouse”. Scroll to the bottom and make a new entry for Mail.app and create a shortcut for the Menu item “Message Viewer”. Map it to the keystroke you’d like (I chose ⌘-O) and you’re set to go.

The cool thing is that you can pretty much create shortcuts for any menu item in any app. In theory.
Sadly it doesn’t consistently work in all apps, as I’ve outlined once here, and of course it only works for menu items, so for more specialized stuff you’ll have to use more advanced alternatives such as QuicKeys, which I gave a short introduction to here.
1/07/2008
As mentioned before: Mouse bad, Keyboard good. Back when I thought I was going to be a designer and spend my life in Photoshop and Illustrator I still was a huge fan of keyboard shortcuts. Difference is that since the mouse was, by necessity, my weapon of choice in those days and my love for hotkeys was limited to those found within the apps themselves. Nowadays I spend most of my screentime working in TextMate and don’t reach for the mouse unless I have to.
In my ongoing rant about killer keystrokes I’m gonna turn to an app I found while trying to solve a particular conundrum.
The story goes like this: After a long time of using my laptop keyboard I’d gotten used to having my Exposé keys be the four rightmost F-keys. F9 through F12 on a MacBook Pro. When I got an external keyboard Apple had graciously endowed me with seven more F-keys, up to a grand total of 19. Ever the autist, the thought of reprogramming my muscle memory to slamming down at a new location seemed too much of a chore. However, I couldn’t just remap Exposé to F16 through F19, because then I’d be stranded when I used my laptop without the external keyboard.
I tried several solutions, starting of course with searching iUseThis where somehow I didn’t find this particular app at the time. I lurked around several AppleScript fora and found some solutions that was just too damn dirty to be acceptable. Finally I found QuicKeys.
My solution? Remap F16 through F19 to fire off F9 through F12. This may still seem a bit dirty. After all, now I have a duplicate set of Exposé keys, but think about it; My brain is hardwired to use F9 – F12 for Exposé so I’ll really never be able to use them for anything else. Furthermore I only ever use F16 – F19 when my external keyboard is attached, so they’re doing exactly what I want. Enough of the dreary backstory. Let’s have a look at QuicKeys.
Read the rest of this article »
30/06/2008
I might be the only one with this problem, but in case that isn’t true I thought I’d write up a short one.
I love (Nay; Depend on!) Firebug for my HTML/CSS/JS work and I also hate having to use the mouse if I can get stuff done with a keystroke instead. (I’ll be writing a series of posts on how to avoid the mouse as much as possible in the near future.)
Firebug does come with a predefined hotkey to open/close the panel, but sadly that hotkey is F12 which I’ve already mapped to Exposé and am unwilling to give up. In theory This should be easy to fix by going to the System Preferences -> Keyboard And Mouse -> Keyboard Shortcuts panel and remapping there, but however much I tried I couldn’t get this to work. The solution? Risky and potentially ruinous hardcoding hackery of the plugin itself.
What I did was navigate to the .xul file within the Firebug folder buried deep within the user Library. The path below shows you where to find this file.
~Library/Application Support/Firefox/Profiles/nil9olmf.default/Extensions/firebug@software.joehewitt.com/content/firebug/browserOverlay.xul
Having opened this file in a text editor (preferably TextMate) I just did a search for the string “F12″, and lo and behold:
1 2 3 4 5 6
| <keyset id="mainKeyset">
<key id="key_toggleFirebug" keycode="VK_F12"
command="cmd_toggleFirebug"/>
<key id="key_detachFirebug" keycode="VK_F12" modifiers="accel"
command="cmd_detachFirebug"/>
</keyset> |
This line seemed pretty much what I was looking for. Crossing my fingers and with a silent prayer I merely changed the “VK_12″s to “VK_F2″s and Bob was, as they say, my uncle.
As is pretty much the case with anything I perpetrate against my Mac I don’t recommend you do this unless you’re ready to face the consequences. (I can’t imagine they’d be any more severe than having to reinstall Firebug, but still…) Chances are the problem only showed up in the first place because of my irresponsible messing about with stuff I should’ve left alone, but if you do have the same problem, here’s the fix.
Be aware also that you’ll have to repeat this procedure every time you update Firebug, so you may want to bookmark this blog and come back every day for the rest of your life.