Welcome to MSDN Blogs Sign in | Join | Help

After three Visual Studio releases and five and a half years with Microsoft, I’m moving back to Texas!

My journey began on a mysterious new product code named “Burton”, which became Visual Studio Team System.  Those first three years with VSTS shipping “Whidbey” (VS 2005) and “Orcas” (VS 2008) were a real privilege working with great people on a fantastic product.  In the last two and a half years I have been at the core of VS as part of the VS Platform team working on the new WPF based shell, WPF Start Page, customer feedback mechanism (we call SQM), and working towards shipping the VS Express 2010 products.  VS 2010 is going to be a great product and I’m looking forward to installing the final release in the coming months.  Cheers!

Blogging moved to http://coadblog.com

The RSS feed will be automatically redirected.  Thanks to all readers and keep an eye out on my new blog site for future updates!

0 Comments
Filed under:

Microsoft wants you to be able to use the Professional version of its software development tools and is making it easy for students and new businesses to get started.  These are essentially free MSDN subscriptions that include VS Pro, SQL, Expression, and Windows Server.

  • DreamSpark for Students
    ”DreamSpark is simple; it's all about giving students Microsoft professional-level developer and designer tools at no charge so you can chase your dreams and create the next big breakthrough in technology - or just get a head start on your career.”

    All that is required is verification by MS of your enrollment at a major college, a .edu email address, or by contacting the support team.  High School students can get it by a request from their teacher.
     
  • BizSpark for New Businesses
    ”A program that provides Software, Support and Visibility for Software Startups.”

    The requirement here is that your company is privately held, less than three years old, and making less than $1M annually… or if you help startups you can be a ‘Network Partner’.
     
  • WebsiteSpark for New Web Sites
    ”A program that offers visibility, support and software for professional Web Developers and Designers”

    This program is good for a total of up to three users per Web design and development company, no more than 10 total members in the company, and deployment of a website with the tools within 6 months.
     

Of course with any of these programs, you should check the website for the details on eligibility, my notes are just a synopsis.  For hobbyist that don’t fall into one of these categories, I suggest the VS Express products or think of a fun idea to make some money and start a small business to get into the BizSpark or WebsiteSpark programs.

Sometimes you want to use a Difference (or Minus) set operation which goes like this: Give me all elements from set A that do not exist in set B.  Or simply put A – B.  The LINQ Except method does this if both sets A and B are of the same type, but frequently the sets are of different types and must have their identifiers matched.  Here is a quick little example of how to do this with LINQ.

Wolfram MathWorld shows the operation’s definition as: 

static void Main(string[] args)
{
  List<string> names = new List<string>
  { "Noah", "Sarah", "Josiah", "Craig", "Carolin" };
 
  Dictionary<string, string> visiting = new Dictionary<string, string>()
  { { "Noah", "Turkey" }, { "Craig", "Germany" }, { "Sue", "Bangalore" } };
 
  var minus =
    from n in names
    let places = from p in visiting select p.Key
    where !places.Contains(n)
    select n;
 
  foreach (var v in minus)
    Console.WriteLine(v);
 
  Console.ReadKey();
}

Output:

Sarah 
Josiah 
Carolin

The dot notation way of doing this would be "names.Where(a => !visiting.Select(b => b.Key).Contains(a))".  I realize this all seems to be relatively trivial for one familiar with LINQ, but at the time of writing this there isn’t a decent topic popping up on Bing or Google when searching for LINQ Minus C# with two types of sets, now hopefully there will be. If you know of a more efficient way, please by all means post a comment, thanks.

References

4 Comments
Filed under:

Microsoft 5 Year Service Award Five years ago today I walked into Microsoft building 41 as green as the first day of college.  This entire time I’ve been in the Developer Division with the pleasure to work on improving some of the best software development tools in the industry.  The first 3.5 years were in Visual Studio Team System and the last year and a half have been on the core Visual Studio platform team.  I’m now working on shipping my third version of Visual Studio and have worked as a Program Manager on a number of interesting projects, including…

  • Visual Studio Team System (VSTS)
  • Visual Studio Debugger
  • Visual Studio Unit Testing
  • VSTS Process Guidance
  • VSTS Training Materials
  • Release Management
  • WPF based VS Shell for VS 2010
  • WPF Start Page for VS 2010
  • xcopy deployable VS we’re using for internal tooling
  • VS Setup improvements in performance and ease
  • VS Express product line ownership
  • improvements to VS core assets such as the Toolbox, Error List, Output Window, etc

These projects have included your typical corporate software development tasks as a Program Manager, such as team coordination, resource scheduling, writing specifications, strategic planning, countless demos, internal reporting, asset organization, competitive analysis, bug triaging, collecting customer feedback, documenting, blogging, internal corporate evangelism, training, providing support, design reviews, involving key customers (eg, MVPs), event planning, creating samples, college recruiting, new hire interviewing, providing field support, presenting at conferences, and a little coding here and there.

(pictured is the MS 5-yr service award)

dell-dock Took me awhile to find this, so it is worth sharing.  If you have a computer (usually laptop, notebook, etc) with a docking station and want to tell the PC to undock itself from the station from the command line, this is it.  For me the scenario is that I frequently undock my system to take it home or to the office, which means I manually hit the undock button, remove the PC, open up the lid, wait for it to respond, then close the lid to put it to sleep.  Now I have a little batch file that I click that undocks the PC and goes to sleep a few moments later.  I’ve tested that this works for Windows XP (WinXP), Windows Vista, and Windows 7 (Win7).


Here is the command line…

rundll32 cfgmgr32.dll,CM_Request_Eject_PC


And here is some C# code from the entry I added to pinvoke.net,
the Visual Studio solution with code is here ejectpc.zip

class Program
{
  [DllImport("cfgmgr32.dll", SetLastError = true)]
  static extern int CM_Request_Eject_PC();
 
  static void Main(string[] args)
  { CM_Request_Eject_PC(); }
}


Worth noting is that the command begins the undock process, notifies the user via the normal hardware mechanisms that the PC is ready for undock, and then waits for the user to either undock the machine or a timeout.  This is handy for knowing when the machine was actually undocked.


And yet another option is to use a little bit of .vbs windows script code, ejectpc.vbs

CreateObject("Shell.Application").EjectPC


References

3 Comments
Filed under:

We just released VS2010 Beta 1 to the web for public download!!  This is very exciting as my team, the Visual Studio Platform (VSP) team, has made tremendous effort and new functionality in this release of VS.  My VSP team is specifically responsible for the new editor, new WPF based shell, MS Build, VS Extensibility, and more.  There are already many good posts out there about specific new features in VS (such as the post by JasonZ), so I’m focusing my post on the resources to keep your eye on as we roll out announcements about the new features.

One thing I’ll mention that’s new and you may not hear elsewhere, is that we are now sporting a nice new web download ‘bootstrapper’ for Visual Studio.  Express benefitted from this in 2008 and now Pro and VSTS use it.  The advantage is that you start of by getting the ‘downloader’ that is 5MB instead of the full 1.2GB product.  VS Pro/TS is made up of about 20 other major components plus the Visual Studio core bits, runtimes like VC Redist 10, .NET FX 4.0, SQL Express, etc.  If any of these are already installed, the downloader won’t have to download and install them.

Glossary: PM = Program Manager, VS = Visual Studio, DevDiv = Developer Division (where VS & .NET are made), but you already knew these if your interested in this post! :)

0 Comments
Filed under:

NewEgg, 1TB External HDD, 22-111-019-11, SmallI was just browsing my favorite computer supplier, newegg.com, when I came across this awesome deal.  It is a 1 TB "Hammer Storage" USB 2.0 external drive.  Sure it's not a major brand and the $100 is after a $20 mail-in rebate, but hey, what an amazing deal.

http://www.newegg.com/Product/Product.aspx?Item=N82E16822111019

Last night I was browsing for a 1TB drive for my HP EX470 Windows Home Server (WHS) (love the server!), and this is just perfect… just plug it into the redundant storage system and get an extra 1TB in the storage pool.  Long warranty, high speed, etc aren't a requirement in my case where I'm mostly backing up pictures, music, etc on an already redundant pool.  In fact, that's one of the beauties of using WHS, if a drive goes bad, no big deal, just hot-swap it.

BTW, I was at Fry's Electronics yesterday and was impressed with the $160 1TB external they had on sale there, then was impressed with the $120 internal 1TB drives on newegg.com, but this takes the cake.  External drives are usually more than internal. 

Of last note, I've had perfect success with newegg.com rebates.  The enclosure doesn't have a fan, but that's one of the reasons it is so quite and my best external drives at home don't have fans either.

References

0 Comments
Filed under:

http://www.collegehumor.com/video:1832128  (tis the season…)

(thanks to noah's mark)

0 Comments
Filed under:

Today I saw some C# language syntax that made me think, "hey, wait a minute, I didn't know you could do that!", so perhaps it'll be new to someone else too.  Honestly, I don't know how I missed this memo.

Let's start off with the code, then we'll talk about it.  I'll including some additional lambda stuff here for the fun of it.  Sample code project: DelegateTypeInference.zip

    1 using System;

    2 using System.Threading;

    3 using System.Reflection;

    4 

    5 namespace DelegateTypeInference

    6 {

    7   class Program

    8   {

    9     static void Main(string[] args)

   10     {

   11       A(new ThreadStart(ShowTime));

   12       A(delegate { ShowTime(); });

   13       A(ShowTime);

   14       A(() => ShowTime());

   15       A(() => { ShowTime(); Console.WriteLine("boo"); });

   16 

   17       B(a => ShowTime());

   18       C((a, b) => { ShowTime(); return null; });

   19     }

   20 

   21     static void ShowTime()

   22     { Console.WriteLine(DateTime.Now); }

   23 

   24     static void A(ThreadStart t)

   25     { t(); }

   26 

   27     static void B(WaitCallback w)

   28     { w(null); }

   29 

   30     static void C(ModuleResolveEventHandler m)

   31     { Module mod = m(null, null); }

   32   }

   33 }

Look at line #11, okay, that's been in there since C# day 1, the ability to pass a method (TinyCall) as a parameter (to function A) with a strongly typed method signature (ThreadStart).  Then in C# 2.0 one could use line #12 with the keyword delegate to create an anonymous function (no method name here, just some code). 

What I didn't know until today is that line #13 would work, that you can just pass the method name as the parameter and the delegate type would be inferred.  Nice and easy.  Line #14/#15 was also new to me, well at least the part about using () for an empty parameter list.

Thrown in are some more C# 3.0 lambda expressions just for the heck of it.  Line #14 is an anonymous function with no return type (void), no parameters, and only one call within the function body (like line #12).  Line #15 has more than one call with the same structure.  Lines #17 & #18 are included for reference of other common lambda uses using different method signatures.

References

2 Comments
Filed under:

800px-EBay_Logo_svgRSS feeds are popping up right and left these days for everything from news, to friends’ pictures, to Internet searches.  Recently I discovered that eBay has RSS feeds for auction searches.  It is really handy to keep an eye out for those unique finds that can easily slip by, or as a way to group searches into one place, or as a handy way to only see new new items posted for a given search.

Here’s the RSS URL for a search:

http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=0&language=en-US&output=RSS20&satitle=<search term here>

For example:

http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=0&language=en-US&output=RSS20&satitle=digital+oscilloscope

I’ve been refining my searches on the eBay web site, then using my favorite RSS reader to keep an eye out for stellar deals (example of a highly refined search).  There is a little RSS icon at the bottom eBay RSS iconof a search results page you can use to grab the RSS URL.  If you don’t see the icon, it may be that your search is being run by the beta program (more info).

Feed Reader of Choice
P.S.  For my RSS reader, I love the super easy workflow of Google Reader and am collating my feeds there.  The single big list concept is awesome, it has great keyboard access (just hit 'n' to see the next item), is easy to use on my mobile phone, pulls feeds automatically for me without my PC turned on, has some really nice browser integration features, searching the feeds is fast, and it uses URL based APIs which makes integrating super easy (eg: add the feed above).

4 Comments
Filed under:
Update (9/4/08): Looks like KeyBank has ended this promotion by now.  Who knows, maybe they’ll try again in the future.

KeyBank is giving away a free iPod Nano when you open an account!  About six months back Dawn and I got our spiffy iPod Nano this way and have been enjoying them ever since.  It tends to be a very limited offer that could end at any moment, so jump on it quick. 

KeyBankFreeIPod
(that’s a iPod Touch pictured next to the Nano, you get the Touch if you sign up for a fancy account)

It is completely free to sign up (at least for the iPod Nano 4GB 3rd gen).  When I did it there were a few key steps, here’s what I remember:

  1. Sign up online for a free checking account
  2. Fax a copy of your driver’s license
  3. Enable online banking
  4. Request a debit/check card for the account
  5. Transfer $50 into your new account

Of course, be sure to check on KeyBank’s web site for the details and specific steps they require for the free iPod.  It looks like they’ve actually updated the rules for this promotional period to get you a little more involved by needing to “make one debit card transaction plus a combination of two direct deposits or automated payments each of $100 or more”.  Though that should be easy, when I signed up, I just used an “Automated Bill Pay” from my current bank, but that was the last promotional period, so I’d recommend checking with them on what constitutes an “automated payment”.

 

iPod Nano 3G Silver Sign up During Business Hours
My #1 tip of advice, start the process and do all the steps during normal business hours, best by 1pm if you’re on the west coast.  You can do all the steps in one fail swoop (~20min) if it’s during business hours, because even though it’s all online, the banking system can create the account and each step of the way in real time only during business hours.  I did mine that way, then I did Dawn’s without thinking about it at ~4pm my time (PST) and since it wasn’t during ‘normal business hours’, I had to wait a day or two for the account to be created.

 

Some other notes…

  • Last time they ran this special for just a few weeks and I found out at the tail end, I have no idea how long this one’s been going on or when it will end, so sign up quick.
  • They require the $50 deposit to meet the iPod requirements.  After getting the iPod, you can simply transfer the $50 back out if you like.  (this time it looks like they also require two automated deposits of $100, which you can also transfer back out)
  • Dawn and I haven’t paid a dime since signing up.  It’s great.
  • It took about six weeks to receive the iPod, but from talking with KeyBank, it sounds like the earlier you sign up, the faster you get the iPod.   They had a big backlog at the end of the last promotion period and Dawn and I signed up in the last few days.
  • Yes, I am an Apple iPod fan.  I jumped on the iPod bandwagon long before the Microsoft Zune was released and I have yet to be given a Zune for free (like my iPods).
  • We received the 4GB Nano, but I sold mine on eBay and got an 8GB with the money +$50 at Target.
  • KeyBank is a big reputable bank, no it’s not a scam, there are many KeyBank locations around where we are in the Seattle area.
  • I believe you can sign up anywhere in the US, even if there isn’t a KeyBank anywhere around you (it’s all online anyway).  KeyBank actually has a nice, easy to use online system.
  • It doesn’t matter how many bank accounts you have elsewhere (or none at all).
  • We did notice on our credit report that there was a new account opened, but that’s it, no big deal.
  • It appears silver is the only color they send out, but hey, it’s free!!

Cheers and enjoy the free iPod!  ( if you sign up from reading this post, please leave a comment to let me know it was worth the time writing about it :) )

12 Comments
Filed under:

ThinkGeek Logo What true geek doesn’t just love the site ThinkGeek.com?  Where one can fulfill their gizmo, t-shirt, poster, plant, science, toy craze of nerddom.  I’ve had a number of items from the site on my wishlist through a few birthdays and Christmas holidays now with no love, so I just broke down and made this batch purchase.  I’m so excited to get my toys in I printed out my receipt to look at till they arrive.  :) 

ThinkGeek, Carnivorous Creations
Desktop Carnivorous Plant Set


As a kid I was fascinated with carnivorous plants and would spend my hard earned money buying whatever new carnivorous plant the local nursery would get in.  This kits’ got a mix of ‘em all, Yellow Trumpet, Hooded Pitcher Plant, Purple Pitcher Plant, Pale Trumpet, Temperate Sundew Plants, Cobra Lillies  (p.s. don’t forget to watch the brilliant musical The Little Shop of Horrors)
 ThinkGeek, Tardis USB Hub
Doctor Who Tardis 4 Port USB Hub


Long time fan of Dr Who, I just couldn’t resist this!  There’s also Dr Who’s Sonic Screwdriver, RC Dalek, and other Dr Who stuff.  I had to start somewhere, and this’ll not only look cool on the desk, it’ll be a drop-dead giveaway for the enlightened.
ThinkGeek, erspectrum
Electromagnetic Radiation Spectrum Poster


When I was a kid my Dad & I had a ‘standard set’ of scientific posters in our electronics lab, including the atomic periodic table, illustration of space probes, solar radiation spectrum, and a similar radio frequency chart to this one.  I spent hours studying the charts and the radio spectrum was always one of my favorites to discuss.  I’ve been wanting one of these for years, they’re hard to find, and seeing ThinkGeek started carrying this is the ‘straw that broke the camel’s back’, the one item that caused me to place this whole order in the first.
ThinkGeek, lg-you-are-dumb2
You are dumb v2.0

Stylish.  These actually look reasonably cool.  I’m frequently looking for the next geek shirt and have purchased some flops (SQL query, etc) and an occasional win (Resistance is Futile (if <1 ohm)), but now my requirement is that the shirt is first off stylish, then geeky.  I’m not a fan of the message on this one per-say, but it looks wearable.
Tron Poster
Tron Movie Poster


This was an item I’ve dearly wanted for over two years, but waited too late and ThinkGeek stopped carrying it, so I found another vendor. Tron 2.0 was one of my favorite PC games too, and there’s rumor of a Tron movie sequel in the works.  I loved the movie and the poster is still stylish to this day.  It’ll make fine wall art for my office.

Among other things worth checking out…

Their website is a fun customer experience as well, with customer shots, fun videos (see the Flux Capacitor), easy navigation, and RSS feeds.  One thing I’ve learned is if you see something you really like, get it quick, I’ve missed out on several items that I had hoped to get due to them being discontinued.  So if you’re a geek, or know one, get your nerd on and head on over to ThinkGeek.com.

p.s. Some other great sites/catalogs are Edmund Scientific’s, Gadget Universe, NewEgg.com’s Gadgets, and for the electronic hobbyist, Phidgets and Parallax microcontrollers.

Question for You:  What’s a favorite geek toy of yours?  Gotten anything recently?

2 Comments
Filed under: ,

Much of the time on the PC is spent rapidly moving from one task to another so quickly that it can be a challenge to keep context of all the projects, web sites, files, thoughts, etc one’s been working with throughout the day.  It’s the bane of all PC users to some extent.  We’re frequently waiting on stuff to load and it’ just so easy to switch between email, browsing the web, programming, etc.  The cost of multi-tasking is painfully high, partially due to the loss of context when switching tasks.

For about a year now I’ve been using a Microsoft OneNote (part of Office, like a personal wiki notepad) page I call “Stream of Consciousness” to jot down tidbits, like keeping a journal.  Using AutoHotKey, I’ve got a global system hotkey assigned to the specific OneNote page so it’s quick to popup anytime.  Some the tidbits I’ll log during the day…

  • quotes
  • thoughts
  • todo tasks
  • project notes
  • websites of interest
  • file & directory paths
  • new vocabulary words
  • links to other OneNote pages
  • points to discuss with colleagues

OneNote, Stream of Conciousness 2

To create a global system hotkey to the page, install AutoHotKey, right-click in OneNote (it can be on a notebook, page, or paragraph), copy a Hyperlink, and add a line to your hot key file that loads on startup, like this:

; Open OneNote 'Stream of Consciousness', Win-Shift-S
#+s::  Run "onenote:///\\NOAHC-CTX\DriveC\Noah\Data\OneNote\General\Miscellaneous.one#Stream%20of%20Consciousness§ion-id={7AAFFB9C-251D-49AC-B0B6-F101916491F8}&page-id={D6A6C28E-A31E-4E6F-9D04-0A246C4C144E}&end"

OneNote also has great searching capabilities, to do list item tracking, fantastic URL linking, and other useful features for journalling.  I find most often I’m using the notes I record for today +/- 2 days, for example, what didn’t finish yesterday, what needs to happen today, what I’ll do tomorrow.  But it is also interesting to go back and look at what I was working on and thinking over time.

You don’t need OneNote, there are other options too, like using a Microsoft Word document, text file, or even a Google Doc.  The advantage of a Google Doc is that it’s always available online.

Hop on here: http://docs.google.com/Doc?id=dcphcmhk_20c9p742g7&invite=hnhgsc6

Google Docs Stream of Consciousness

Discussion Question
(leave a comment)
How do you manage keeping track of context when multi-tasking?
2 Comments
Filed under:

Ever notice the text or font in applications that use an embedded Internet Explorer just isn’t the right size?  Either too small or large?  I’ve encountered this in a number of apps including Microsoft HTML Help Control (for .chm files), Windows Live Writer, and others.

Since I couldn’t find the answer online, I used my MS resources to track down this issue.  It warrants a blog post to help anyone else investigating this.  What’s going on here is that there is a registry key that defines the default text size for IE6 and earlier.  IE7 kept the old key for embedded browsers but uses a new one for full instances of IE.  Some apps (like Product Studio, an internal MS app) change the regkey without setting it back.  The result is that embedded browsers across your PC now look wrong, and there isn’t an easy way to fix it since embedded browsers don’t usually present a text size option.

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International\Scripts\3
Change IEFontSize to “02 00 00 00” for a Normal Font Size

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International\Scripts\3]
"IEFontSize"=hex:02,00,00,00

Download the Reg Fix

 

Example of the CORRECT SIZE:
IE Font Size Small, AutoHotKeyHelp, Correct Size

Example of TOO SMALL:
IE Font Size Small, AutoHotKeyHelp, Too Small

 

Example of TOO LARGE:
IE Font Size Small, AutoHotKeyHelp, Too Large
11 Comments
Filed under:

AutoHotkey_logoI’m a big fan of keeping my hands on the keyboard as much as possible and having real quick easy ‘one-touch’ access to my favorite apps, web sites, and tasks.  It’s just amazing how much more productive one can be when using the keyboard instead of the mouse.  Think of any common app you use in which you have a keyboards shortcut memorized, Ctrl-C to copy, Ctrl-V to paste, IE? Alt-D for the address bar, Word? Ctrl-S to save, Vista? Win key for the Start Menu, etc now imagine the power of having most all of your common tasks that quickly available, yup, pure power.

Now here’s the ultimate hotkey tool, AutoHotKey.  It is a simple ‘scripting’ like app.  It doesn’t have a graphical user interface, but is configured through plain text .ahk files.  Not only can you create hotkeys, but also script other parts of Windows, but I’ll focus this post on the hotkeys.  It is open source, been around a long time, is small, takes little memory, has a great help doc, a strong community, and is easy to use.

AutoHotKey will also allow you to override Windows default hotkeys, like Win-X for the mobility center in Vista.  I have a single .ahk file that loads at startup so the hotkeys are always hooked up.  To do this, first install AutoHotKey, then:

  1. With any text editor (aka Notepad), create a new .ahk file
  2. Add some lines to it for each hotkey (like the ones below)
  3. Add a shortcut to the “Startup” folder in your Start Menu

Some basic hot keys I use are:

Win-X Open favorite web browser
Win-W Open favorite text editor
Win-O Execute the contents of the clipboard
Win-C Open a command prompt
Win-2 Turn off the laptop display to conserver power
Win-` Google Search with the clipboard contents
Win-Ctrl-` Use Google’s ‘I Feel Lucky’ to open the clipboard contents
Win-Shift-O Open a URL in the clipboard
Win-Ctrl-1 Set the screen resolution to 1024x768
Win-Ctrl-2 Set the screen resolution to 1280x1024
Win-Ctrl-6 Set the screen resolution to 1600x1200
Win-Ctrl-8 Set the screen resolution to 800x600
Win-Ctrl-9 Set the screen resolution to 1920x1200
Win-Ctrl-0 Set the screen resolution to the highest the monitor supports
Win-Ctrl-Z Open Microsoft Outlook
Win-Ctrl-X Open Microsoft Excel
Win-Ctrl-W Open Microsoft Word
Win-Ctrl-O Open Microsoft OneNote
Win-Ctrl-V Open Microsoft Visual Studio
Win-Ctrl-B Open Microsoft Live Writer (to Blog)
Win-Shift-S Open a specific OneNote page, “Stream of Consciousness”
Win-Shift-Ctrl-E Edit my master AutoHotKey .ahk file to easily add new hotkeys.
Win-Shift-Ctrl-R Reload my master .ahk file to apply recent changes.
Win-Shift-Ctrl-T Open the AutoHotKey help (.chm) file for reference.
Win-Shift-Ctrl-Y Open AutoHotKey’s Spy Utility

To give an idea for other things you can assign hotkeys for, I’ve got hotkeys to open favorite text files, folders, remote desktop connections, specialty applications, enter login credentials, create a new email to my wife, and a few hotkeys that perform misc repetitive tasks depending on the application.  For other shortcuts, I use SlickRun, which is little commands to the same types of resources, just many more of them.

DownloadIconSmall   Download HotKeys.ahk (the file below)
(also download AutoHotKey)

; ============================================================================
; == Basic keyboard shortcuts
; ============================================================================

; #=Win ^=Ctrl +=Shift !=Alt

; Open favorite webbrowser
#x::   Run about:home

; Open favorite text editor
#w::   Run %edit%

; Execute the contents of the clipboard
#o::   Run %clipboard%

; Open a command prompt
#c::   Run %ComSpec%

; Google Search for clipboard contents
#g::   Run http://www.google.com/search?q=%clipboard%
#`::   Run http://www.google.com/search?q=%clipboard%

; Use Google "I Feel Lucky" to navigate to the clipboard contents
#^`::  Run http://google.com/search?btnI=I`%27m+Feeling+Lucky&q=%clipboard%
#^g::  Run http://google.com/search?btnI=I`%27m+Feeling+Lucky&q=%clipboard%

; Open the clipboard contents with Internet Explorer
#+o::  Run "%ProgramFiles%\Internet Explorer\iexplore.exe" %clipboard%

; Set screen resolutions
#^1::  Run "%tools%\QRes.exe" /x:1024 /y:768  /c:32
#^2::  Run "%tools%\QRes.exe" /x:1280 /y:1024 /c:32
#^6::  Run "%tools%\QRes.exe" /x:1600 /y:1200 /c:32
#^8::  Run "%tools%\QRes.exe" /x:800  /x:600  /c:32
#^9::  Run "%tools%\QRes.exe" /x:1920 /y:1200 /c:32
#^0::  Run "%tools%\SetHighestResolution.exe"

; Open Microsoft Office Applications
#^z::  Run "%ProgramFiles%\Microsoft Office\Office12\OUTLOOK.EXE"
#^x::  Run "%ProgramFiles%\Microsoft Office\Office12\EXCEL.EXE"
#^w::  Run "%ProgramFiles%\Microsoft Office\Office12\WINWORD.EXE"
#^o::  Run "%ProgramFiles%\Microsoft Office\Office12\ONENOTE.EXE"

; Open Windows Live Writer
#^b::  Run "%ProgramFiles%\Windows Live\Writer\WindowsLiveWriter.exe"

; Open Visual Studio
#^v::  Run "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"

; Edit the master AutoHotKey file
#^+e:: Edit

; Open the AutoHotKey help file for reference
#^+t:: Run "%ProgramFiles%\AutoHotkey\AutoHotkey.chm"

; Open the AutoHotKey spy utility
#^+y:: Run "%ProgramFiles%\AutoHotkey\AU3_Spy.exe"

; Reload this AutoHotKey script
#^+r::
  SoundPlay *64
  Reload
  Sleep 1000
  MsgBox 4, , Script reloaded unsuccessful, open it for editing?
  IfMsgBox Yes, Edit
return

; Turn off the monitor (to save laptop battery power)
#2::   
  Run "%tools%\nircmd.exe" monitor off
  Sleep 1000
  Run "%tools%\nircmd.exe" monitor off
return

Some of these commands use the tools: NirCmd, QRes, SetHighestResolution

These also depend on some system environment variables being set:

  • edit = path to favorite text editor, eg: c:\windows\notepad.exe (my favorite, Notepad2)
  • comspec = path to your favorite command prompt, eg: c:\windows\system32\cmd.exe
    (my favorite, 4NT)
  • tools = directory to directory of command line tools, eg: c:\tools

Related Community Topics

Related Posts

Question for You: What are some of the things you use AutoHotKey for?

9 Comments
Filed under:
More Posts Next page »
 
Page view tracker