Tordex Community

Full Version: Trigger tear off menu by desktop right-click?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I wonder if it is possible to show my TLB Menu by right-clicking the desktop.

Currently I have set my menu as Tear OFF, Always On Top, Popup at Cursor, Auto-close Menu, I have also set a hot-key for that. Pressing this hot-key brings up the Menu right under my mouse-pointer, which is almost like one of the best features (custom menus) of replacement shells like Blackbox or LiteStep.
[Image: menucc.jpg]
The only missing behavior I couldn't do yet was to show this Menu by right-clicking the desktop. Can this be set somehow? If not can this somehow issued as a feature request?

thx
szekelya
Currently this is impossible. But I like the idea. I think I can to make a small utility that convert right-click on the desktop into the hotkeys.

BTW, your theme is very awesome!
Thanks a lot, once I'll be ready with skinning all the plugins I'm using, I'll share it.

I have tried to detect desktop right clicks with autohotkey (I'm not a programmer) to trigger another menu application. (Actually it was objectbar, which I have uninstalled since I found TLB)
I could do something, but due to the limitations of autohotkey and lacking any kind of programming expertise I could not detect if the mouse was over a desktop icon, and my menu was triggered also when right-clicking a desktop icon instead of its context menu.

In my view a customizable desktop right-click menu is the most important part of a shell. If you could get this working either from within TLB or with a small application, it would be a great shell extension. Maybe there should be a way to access the original desktop right-click menu (maybe with CTRL+rightclick?).

Many thanks for your help!
Quote:I could do something, but due to the limitations of autohotkey and lacking any kind of programming expertise I could not detect if the mouse was over a desktop icon, and my menu was triggered also when right-clicking a desktop icon instead of its context menu.
Please can you post the script here? Maybe I can to improve it.

PS. Do you use the desktop icons still? Confusedhock:
This was the best I could do. Excluding mozilla was important not to lose mouse gestures that are started with rightclicks in firefox.
Code:
SetTitleMatchMode, 2


#IfWinNotActive, ahk_class MozillaUIWindowClass
RButton::
MouseGetPos,,,winid
WinGetTitle, wintit, ahk_id %winid%
If wintit= Program Manager
    Send, ^q
else
    send {RButton}
#IfWinActive

return

I'm using desktop icons, but most of the time -also on the screenshots- I hide them using stardock fences.
Hi Yuri,

I also have another autohotkey script that emulates another great feature of the blackbox replacement shell. Right-clicking a window titlebar minimizes the window, middle-clicking a window titlebar closes the window. Since both fetches right-clicks, these two interferes with each other.

This one operates with WM_NCHITTEST to detect titlebar clicks. If I knew how to detect desktop clicks either with WM_NCHITTEST or with any other trick, the two features could be combined.

This is the other script (works fine, you can try that, or I can also give the compiled standalone exe)
Code:
SetTitleMatchMode, 2
;#IfWinActive, Firefox
    
    ~RButton::
    {
        CoordMode, Mouse, Screen
        SetMouseDelay, -1 ; no pause after mouse clicks
        SetKeyDelay, -1 ; no pause after keys sent
        MouseGetPos, ClickX, ClickY, WindowUnderMouseID
        WinActivate, ahk_id %WindowUnderMouseID%
        
        WM_NCHITTEST_Result := IsOverTitleBar( ClickX, ClickY, WindowUnderMouseID )
        
        If ( WM_NCHITTEST_Result = 1 ) ; in titlebar enclosed area - top of window
        {
    If ClickY > 22
        {
        ;MsgBox, %ClickY% Right-click in titlebar.
        Send, {ESC}
        ;WinMinimize, ahk_class MozillaUIWindowClass
        WinMinimize, ahk_id %WindowUnderMouseID%
        }
        }
    }
return
    ~MButton::
    {
        CoordMode, Mouse, Screen
        SetMouseDelay, -1 ; no pause after mouse clicks
        SetKeyDelay, -1 ; no pause after keys sent
        MouseGetPos, ClickX, ClickY, WindowUnderMouseID
        WinActivate, ahk_id %WindowUnderMouseID%
        
        WM_NCHITTEST_Result := IsOverTitleBar( ClickX, ClickY, WindowUnderMouseID )
        
        If ( WM_NCHITTEST_Result = 1 ) ; in titlebar enclosed area - top of window
        {
            ;MsgBox, Right-click in Firefox's titlebar.
            ;WinMinimize, ahk_class MozillaUIWindowClass
    WinClose, ahk_id %WindowUnderMouseID%
    Send, {ESC}
        }
    }
return

#IfWinActive

; http://www.autohotkey.com/forum/topic22178.html
IsOverTitleBar(x, y, hWnd)
{
   SendMessage, 0x84,, (x & 0xFFFF) | (y & 0xFFFF) << 16,, ahk_id %hWnd%
;msgbox, %ErrorLevel%
   if ErrorLevel in 2,3,8,9,20,21
      return true
   else
      return false
}
Quote:Currently this is impossible. But I like the idea. I think I can to make a small utility that convert right-click on the desktop into the hotkeys.
Well, the first version is ready and attached Big Grin. Tested on Windows 7 only.
Magnificent! =D> Works great so far. Thank you very much, this is a great addition!
Sooner or later I will have a windows shell I always wanted!

Are you going to productify this or build it into TLB?
Quote:Are you going to productify this or build it into TLB?
I'll publish this as free utility on tordex.com
One more idea: could you add a possibility either by CTRL+right-clicking the desktop to bring up the original context menu, or add a hotkey to desktop keys itself to eenable/disable it?

cheers
szekelya
Hi Yuri,
just recognized that checking the "Run on system startup" checkbox has no effect on Vista. I have put a shortcut to DeskKey into my Startup folder which is my preferred way of auto-launching non-service-like components anyway, just thought I let you know. Still my favorite "plugin" to TLB. Smile
cheers
szekelya
I've published the version 1.0. You can download it here.

Hold down the CTRL key to show the default menu. Also fixed the autorun option.

Thanks.
Thank you very much!!
It works perfectly.
Could the same be achieved by "right" double clicking the mouse on desktop (i had used clickzap in xp for that)? Also a request to add the "left" double click to a hot-key.
Thanks for this wonderful app.

ps: Sorry for bumping an old thread.
Pages: 1 2