Monday, September 06, 2010

Essential All-The-Time AutoHotKey

Have you noticed that tables are so much nicer looking when cells are filled according to a theme? This is trivial to do with HTML, but Bill decided to make it really hard to do with M$ Word.

With Word 2007, all you do is select the cell, which Bill also decided to make hard to do (the trick sometimes is to just drag the cursor precisely to the boundary of the cell and hope for the best. With the leftmost cell, triple-clicking usually works. Then, you should see the Table Tools menu button on the very top bar, click that and you should now see Shading and Borders menu options surface. Anyhow, I just found that out, and the AutoHotKey snippet I have here doesn't apply to that unfortunately.

With M$ Word 2000 or older, you select the cell, then, Alt-o to go into the Format menu, then b, to pick Borders and Shading, then s to get to the Shading tab and you can then pick the colour you want. Which lends itself to this snippet that you should probably add to your Johnny-KDE-Style-Easy-Window-Drag script. Man, how much have Johnny and Rajat contributed to the well-being of the human race by just boosting my productivity?


SetTitleMatchMode, 2
; default is 1
; This is the setting that runs smoothest on my
; system. Depending on your video card and cpu
; power, you may want to raise or lower this value.

SetWinDelay,2
CoordMode,Mouse
return

^!RButton::Suspend
; M$ word, send key/mouse sequence to get the borders and shading menu on
; a table cell. Note, cursor must remain in the cell!! :)
$!b::
IfWinActive, - Microsoft Word
{
 Sleep 200
 Click 3
 Send !o
 Send b
 Send s
}
Return


Enjoy!!










No comments: