I've got an MS MouseExplorer and came with the following code to make it open links in a new window when I browsing with IE:
XButton2::
If WinActive("ahk_class IEFrame")
{
Send, {SHIFT down}{LButton}{SHIFT up}
return
}
else
{
Send, {XButton2}
return
}
Now I would like to make it work with all apps that use IE for browsing purposes (Html Help for instance). I need to detect the class of window that is currently under mouse cursor. How to do this?






Logged












Here's a script from AHK's help file:
You could send a RightClick and choose Copy Shortcut or something from the menu, depending on the window beneath the cursor, and then Run or paste it. 