Tuesday, November 29, 2016

Visual Studio Code: Autohotkey-based popup Cheatsheet for Keyboard Shortcuts

11/29/2016: I like Visual Studio Code a lot - it's got some warts, and gaps, but there's some thing's it does amazingly well (and some it sort of stumbles at). If you write in Powershell, it's probably the best/lightest/most-stable editor I've found, with the range of features you get, and rampant-growth and availability in user-created extensions -  (Though it really needs better-rounded debugging... *grumble* ;P) .

Anyway, one of my pet peeves for 'Code.exe' is it's lack of good quick popup references for common tasks - well that and some of it's interface & control choices that don't match most of the common keystrokes and mouse behaviors I've gotten used to in other editors.

Autohotkey fills the gap!

Toward that end, the below is an Autohotkey-based quick-n-dirty Popup Cheatsheet for Visual Studio Code. If you use  AHK & 'Code', you might find this gapfills a niche.

I don't doubt you can hack Code.exe itself to display a menu with a hot key binding. But I work for a living ; I don't want to burn a lot of time learning how to build objects in code.exe itself. :P But I do make tons of use of AutoHotKey these days -- (automation tied to working for a firm with a lot more user-interaction than I've had in the past: BOILERPLATE! AUTOMATE!) --  so I decided yesterday to take a few minutes and whip up a quick popup dialog in AHK that just lists out the key keyboard shortcuts I want to use (especially where addon extension commands and bindings are concerned).

It's pretty simple, docs are inline in the script (stored & kept updated at Github):
Two chunks below: the .ahk script file, and a .csv file that drives the displayed menu.

Lemme know if you have any questions. :^D

What's your revision, Exchange?

11/29/2016: More quick-shared code: This is a tweaked variant of Bhargav Shukla's script that polls all Exchange 2007/2010/2013 boxes in the org, and reports on current Exch patch revision.
Changes I made were pretty minimal: adding pshelp, reformatting layout a tad, adding progress echo's, and renaming the output to a timestamped csv file, named for the script itself (easier to track changes over time, than the default 'results.csv' in your script directory). 

Here's the code

Autohotkey hotkeys for Ecco Pro

11/29/2016: I've committed to actively trying to post more of what I write for code snippets, time-permitting. :D
Today, frustration at a lack of the functional hotkeys I wanted in the old EccoPro outliner, led me to throw together some quick functions in Autohotkey.

This is very sketchy very quick & dirty, simple menu-automation. Gets the job done. I guess at most it'd save someone five mins or so tossing the necessary AHK Send commands together from scratch. :D
Here's the code