Here a a few of my “staples” that are always with me (in AHK script code)
These are what AHK call “Hotstrings” (think of text expander)
The setup is – :*:when_i_type_this::ItIsReplacedWithThis
Example: :*:btw::By the way
– So, typing btw would instantly be replaced with By the way
:*:@work::myworkemail@mywork.com
:*:@home::fischgeek@gmail.com
:*:#work::701.xxx.xxxx
:*:#cell::701.xxx.xxxx
:*:@address::1234 8th street S
:*:qq::quick question for you
Some html/jquery maniuplation
This one is necessary because I never remember the proper syntax for a quick setTimeout function in javascript.
:*:jstimeout::setTimeout(function(){{} alert("Hello"); {}}, 3000);
Type in jstimeout
and it spits out the below:
setTimeout(function(){ alert("Hello"); }, 3000);
Yup. I’m lazy.
:*:nbsp::
:*?:br/::<br />
These two just type out different console.log lines (with and without quotes in it) and sends the cursor in between the parentheses.
:*:c.l1::console.log();{left 2}
:*:c.l2::console.log('');{left 3}
Similar to the above two, these also add whatever is in your clipboard at the time so you can inspect the variable in the console.
:*:c.l3::
SendInput console.log('%Clipboard% : ' {+} %Clipboard%);
return
:*:c.l4::
SendInput console.log('%Clipboard% : ' {+} Object.keys(%Clipboard%));
return
Just a few to test the waters and see if anyone likes these. Let me know if you would like to explain more and/or post more. I have plenty!
Thanks everyone!