Developer Toolbox AutoHotKey Super Snippets
So I’ve been working with a bunch of REALLY old code lately and one thing I run into over and over again is queries with no queryparam.
I do have a snippet setup in CFEclipse to insert a queryparam…
But I still have to cut-n-paste the variable, etc. Kind of a pain when doing it over and over again. So I started tinkering with AutoHotKey (my favorite lazy tool) and came up with this:
:::bat
;-- Wrap selected text in QueryParam (will first strip ' or ") ---
!q::
clipboard =
send ^c
clipwait, 1
If ErrorLevel = 0
StringReplace, clipboard, clipboard, ', , All
{
clipboard =
send ^v
}
return
So now I simply highlight my variable - hit my key combo (in this case [ALT]+[Q] and my text is copied to the clipboard - stripped of quote marks, wrapped in the queryparam and sent back to the editor!