Trigger tear off menu by desktop right-click?
Started by szekelya


Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


15 posts in this topic
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-01-2010, 03:09 AM -
#1
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
Visit my deviantArt gallery: http://ethsza.deviantart.com
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
03-01-2010, 06:48 AM -
#2
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!
The TORDEX Team
http://www.tordex.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-01-2010, 07:21 AM -
#3
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!
Visit my deviantArt gallery: http://ethsza.deviantart.com
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
03-02-2010, 12:06 PM -
#4
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:
The TORDEX Team
http://www.tordex.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-02-2010, 12:25 PM -
#5
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.
Visit my deviantArt gallery: http://ethsza.deviantart.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-03-2010, 02:23 AM -
#6
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
}
Visit my deviantArt gallery: http://ethsza.deviantart.com
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
03-16-2010, 06:36 PM -
#7
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.


Attached Files
.zip   deskKeys.zip (Size: 761.17 KB / Downloads: 625)
The TORDEX Team
http://www.tordex.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-16-2010, 11:58 PM -
#8
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?
Visit my deviantArt gallery: http://ethsza.deviantart.com
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
03-17-2010, 12:57 PM -
#9
Quote:Are you going to productify this or build it into TLB?
I'll publish this as free utility on tordex.com
The TORDEX Team
http://www.tordex.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-19-2010, 06:38 AM -
#10
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
Visit my deviantArt gallery: http://ethsza.deviantart.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-21-2010, 11:55 PM -
#11
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
Visit my deviantArt gallery: http://ethsza.deviantart.com
Yuri Kobets
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
03-30-2010, 01:17 PM -
#12
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.
The TORDEX Team
http://www.tordex.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-30-2010, 01:58 PM -
#13
Thank you very much!!
Visit my deviantArt gallery: http://ethsza.deviantart.com
szekelya
Junior Member
**


0
37 posts 15 threads Joined: Feb 2010
03-31-2010, 01:58 AM -
#14
It works perfectly.
Visit my deviantArt gallery: http://ethsza.deviantart.com
reddevil
Junior Member
**


0
5 posts 0 threads Joined: Sep 2010
09-28-2010, 08:00 AM -
#15
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.


Forum Jump:


Users browsing this thread: 4 Guest(s)