Workaround for scan popup functionality

Scan popup doesn't work with Firefox 4+, Chrome, and Opera.
As discussed in this thread, https://github.com/goldendict/goldendict/pull/26
it is hard to detect the word under the mouse cursor in different browsers.
Suggestion is to copy the word into the clipboard, and use the hotkey to translate the word in the clipboard.
The following ahk code can simplify the whole process, and make it almost as simple as the original scan popup.
1 Install AHK from http://www.autohotkey.com/
2 Save the following code as filename.ahk.
3 Execute the file you saved.
4 Open your browser, press Alt+Left mouse button on the word you want to look up.
5 The scan popup show up.
Don't bother to try Ctrl or Shift +LButton combo,
because these will make the browser choose wrong word when you want to lookup another word.
If you computer is slow, try to change the line "sleep, 250" to a higher value.
The code was tested in Firefox 7, Chrome 13, and Opera 11.6.
============= code start here ==================
!LButton::
{
Click 2
sleep, 250
Sendinput, {ctrl down}cc{ctrl up}
}
=============================================
As discussed in this thread, https://github.com/goldendict/goldendict/pull/26
it is hard to detect the word under the mouse cursor in different browsers.
Suggestion is to copy the word into the clipboard, and use the hotkey to translate the word in the clipboard.
The following ahk code can simplify the whole process, and make it almost as simple as the original scan popup.
1 Install AHK from http://www.autohotkey.com/
2 Save the following code as filename.ahk.
3 Execute the file you saved.
4 Open your browser, press Alt+Left mouse button on the word you want to look up.
5 The scan popup show up.
Don't bother to try Ctrl or Shift +LButton combo,
because these will make the browser choose wrong word when you want to lookup another word.
If you computer is slow, try to change the line "sleep, 250" to a higher value.
The code was tested in Firefox 7, Chrome 13, and Opera 11.6.
============= code start here ==================
!LButton::
{
Click 2
sleep, 250
Sendinput, {ctrl down}cc{ctrl up}
}
=============================================