It was fast as I already has the base code to create the menu:
menuReferenceTools =
(
&Google Search
http://www.google.com/search?hl=en&q=@@
Google &Images
http://images.google.com/images?hl=en&@@
&Dictionary.com
http://www.dictionary.com/search?q=@@&db=*, , max
The &Free Dictionary
http://www.thefreedictionary.com/@@
&Merriam-Webster
http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=@@
&Wikipedia
http://en.wikipedia.org/w/wiki.phtml?search=@@
&Columbia Encyclopedia
http://columbia.thefreedictionary.com/@@
&Encarta Encyclopedia
http://encarta.msn.com/encnet/refpages/search.aspx?q=@@
&AutoHotkey manual
http://www.autohotkey.com/docs/commands/@@.htm
)
#+r::
Send ^c
Sleep 100
CreateMenu("mRef", menuReferenceTools, "ReferenceTools")
Menu mRef, Show
Return
ReferenceTools:
RunMenuItem(menuReferenceTools, A_ThisMenuItemPos)
Return
CreateMenu(_menuName, _menuDef, _menuLabel)
{
Loop Parse, _menuDef, `n
{
If (Mod(A_Index, 2) = 1) ; Odd
{
Menu %_menuName%, Add, %A_LoopField%, %_menuLabel%
}
}
}
RunMenuItem(_menuDef, _index)
{
Loop Parse, _menuDef, `n
{
If (_index * 2 = A_Index)
{
StringReplace toRun, A_LoopField, @@, %Clipboard%, All
Run %toRun%
Break
}
}
}
I will add this to my tool box! :-) Thanks for the idea.