Over the last few months, several articles have been written about the productivity boost associated with having two (or more) monitors (e.g.,
NYTimes). I've had dual monitors at work and home for two months and I love it. Extending the desktop environment over much larger screen real estate means you don't have to constantly switch between various applications. I can have my email, IM, or browsers up in one monitor while I read a document or code in an IDE in another.
One pain associated with doing this on Windows XP is the fact that you have to go into the Display Properties, select the second montior, and check "Extend my Windows desktop onto this monitor.". This is a pain because sometimes when I undock my laptop, it won't recognize that the second monitor isn't attached. And even if it does recognize that it is disconnected, when I hook up to the docking station again I have to go back into the properties and re-check the "extend my desktop" box.
I figured there had to be a way to script this setting. I found the ChangeDisplaySettingsEx API, but it wasn't easily scriptable. Next I looked at simulating GUI movements. A quick Google search led me to
AutoIt, which looked like exactly what I needed. Plus it is free!
AutoIt was very easy to install and use. It only took me a couple minutes to create this script which will toggle the 'extend my desktop' box:
Run("C:\WINDOWS\system32\control.exe desk.cpl,@0,3")
WinWaitActive("Display Properties")
Send("{TAB}")
Send("{DOWN}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{SPACE}")
Send("{ENTER}")It's a hack, but it works great. Even better than that, AutoIt has an option to compile scripts to executables. This won't work for everyone, but
here is my compiled script.
My friends at
Xobni are looking
to hire some top notch hackers. I met
Adam Smith, one of the founders of Xobni, during my
New Enterprises class at MIT. Very sharp guy and I'm optimistic about Xobni's chances to make a big impact in the email intelligence market.
If you want to work with smart people in a startup environment that has a decent chance of a good return,
check them out. Oh, and did I mention that
YCombinator made the initial investment in Xobni?