6197 comments
2357 subscribers
Follow me on Twitter (@sachac)
Subscribe! Feed reader E-mail

AutoHotkey scripts for switching to windows

Muscle memory helps you be more efficient. Here’s some AutoHotkey code I use to toggle Chrome (F10), Windows Live Writer (F11), or my Freemind mindmap for Life (F12). Make your own! =)

F10::
WinGetActiveTitle, Title
If Instr(Title, "Google Chrome") > 0
{
   WinMinimize, A
}
Else If WinExist("ahk_class Chrome_WindowImpl_0")
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, "C:\Documents and Settings\Administrator\Local Settings\Application 

Data\Google\Chrome\Application\chrome.exe"
}
return
F11::
WinGetActiveTitle, Title
If Instr(Title, "Windows Live Writer") > 0
{
   WinMinimize, A
}
Else If WinExist("ahk_class WindowsForms10.Window.8.app.0.33c0d9d")
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, "C:\Program Files\Windows Live\Writer\WindowsLiveWriter.exe"
}
return
F12::
WinGetActiveTitle, Title
If InStr(Title, "Life.mm") > 0
{
   WinMinimize, A
}
Else IfWinExist Life.mm
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, c:\sacha\Life.mm"
}
return
Short URL: http://sachachua.com/blog/p/6948

On This Day...

  • 2013: Cooking: Warm lentil salad with sausages — “Eat more healthily” is a popular New Year’s resolution. It’s on our list too – a push towards eating more [...]
  • 2012: LEGO and Indiana Jones: nuking the fridge got a lot more fun — W- picked up the LEGO Indiana Jones game to round out our collection, and we’ve all been enjoying it. The [...]
  • 2011: Moving my book notes online — I moved more of my book notes online, reasoning that a braindump is better than occasional whining about the lack [...]
  • 2010: On pen and paper — A friend of mine wanted to know my notebook preferences, so here’s what I do in terms of pen and [...]
  • 2010: Offline and online conversations — Do you miss the serendipity of hallway conversations at conferences and events? Online conversations can be more powerful than offline ones. [...]
  • 2009: Emacs, file-cache, and ido — (require 'filecache) (require 'ido) (defun file-cache-ido-find-file (file) "Using ido, interactively open file from file cache'. First select a file, matched using ido-switch-buffer [...]
  • 2008: Teaching the attitude — J- was getting frustrated by the game of chess she was playing with her dad. She couldn’t see any good [...]
  • 2007: Neko — One of the little joys of being home is spending time with my cat, whom no one else loves, but stays [...]
  • 2007: On hold — You think that of all people, Simon and I would be able to find some way to talk for free (or [...]
  • 2007: You know, things aren’t so bad — There are lots of positive things to focus on. =) I just have to have faith that if I keep learning [...]
  • 2007: All that is precious — If I listen to the quiet stirrings of my heart, to the restlessness that prevents me from spending days here like [...]
  • 2005: One #emacs day – 0. 2005.01.05 and 1. 2005.01.06 — ([[EmacsDay#note1][EmacsDay:1]]”[[EmacsTips#note20][EmacsTips:20]]) (Technically, one and a half, because this is the first entry) Here are interesting tidbits from irc://irc.freenode.net/#emacs Code - M-x column-number-mode makes [...]
  • 2005: Physics in the City, Eastwood, Jan 15 — As Rick posted on PLUG: The organizers of the Physics in the City on Jan. 15 at Eastwood City have lined up [...]
  • 2005: The Command Line in 2004 — http://home.earthlink.net/~android606/commandline/index.html Garrett Birkel wrote an interesting response to Neal Stephenson’s “In the Beginning was the Command Line”. On Technorati: geek
  • 2005: 43Folders: Snapshots of a Dream Productivity App — Hooks and more hooks – As I’ve repeated until I’m hoarse, apps like Quicksilver change the way you use your Mac. [...]