Hi,
I'm trying to write a script for detecting when the desktop is rightclicked, and show an ObjectBar menu (by sending it's activation hotkey) instead of showing the default Vista desktop rightclick menu.
Of course, if anything other is rightclicked (application, taskbar, window titlebars, tray icons, etc) the right click must be passed.
I'm almost fine with my script like this:
Code:
SetTitleMatchMode, 2
RButton::
IfWinActive, Firefox
{
ControlSend,,{RButton},Firefox
}
MouseGetPos,,,winid
WinGetTitle, wintit, ahk_id %winid%
If wintit= Program Manager
send ^q
else
send {RButton}
return
The only thing that's not working well is my mouse gestures in Firefox, where you have to move your mouse while pressing the right mouse button. What happens there is that a single rightclick happens on the page, but the mouse gesture is not initiated. I guess because I simply send a finished rightclick action to the browser.
So I thought if it's firefox below my mouse, I should only send the half of what I'm doing now, just the RButton pressing without releasing it like this:
Code:
IfWinActive, Firefox
{
Send {Click down right}
}
which is still not OK, also brings up rightclick menu in firefox.
Also what I recognized is that the RButton:: hotkey definition is triggered already when pressing the right mouse button before releasing it.
Is there any way to handle this correctly?
Many thanks
Andras