This started out as something small, then grew

.
I am at work. At work I have no firefox. At work I am very bored. At work I have AHK.
I started out writing konqueror-style shortcuts for IE. Then it quickly expanded into a framework for easily making such shortcuts for a wide variety of programs with very little work.
Code:
shortcut =
replace =
control =
window =
:B0C:gg::
shortcut = gg
replace = http://www.google.com/search?q=$replace$
GoSub, IEShortcut
return
:C:ahk::
shortcut = ahk
replace = http://www.autohotkey.com
GoSub, IEShortcut
return
:C:docs::
shortcut= docs
replace = My Documents
GoSub, ExplorerShortcut
return
IEShortcut:
window = ahk_class IEFrame
control = Edit1
GoSub, DoShortcut
return
ExplorerShortcut:
window = ahk_class ExploreWClass
control = edit1
GoSub, DoShortcut
return
DoShortcut:
IfWinActive, %window%
{
ControlGetFocus, ctrl, %window%
If ctrl = %control%
{
KeyWait, Enter, D ;wait for the user to type the parameters
ControlGetText, text, %control%, %window%
Stringlen, first, shortcut
first += 1 ;to handle an end key
StringLen, len, text
StringRight, param, text, (len - first)
param = %param%
StringReplace, out, replace, $replace$, %param%
temp = %clipboard%
clipboard = %out%
Send, ^a{del}^v{Enter}
clipboard = %temp%
shortcut =
replace =
}
}
return
The only really important bits of that is the DoShortcut sub. The rest of it is examples. Basically to use the framework, you make a sub that sets the variables window and control for whatever program you want it triggered for. I included such methods for IE and Explorer windows. You can make as many as you need with no fuss. Then in a hotstring you merely set the shortcut and replace variables (putting $replace$ in where you want parameters placed) and call the desired Shortcut sub. Poof. Instant shortcut.
The examples let you type something like gg: autohotkey to search google for autohotkey. Type to jump here, and in an Explorer window, type to jump to my documents. The nice thing about using hotstrings is that you can easily set the triggering options for each shortcut individually.
Give it a try and let me know if there are any horrible bugs floating about.