DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: IDEA: middle click on desktop to get quick launch or 'start menu'  (Read 33,432 times)

xunil

  • Participant
  • Joined in 2008
  • *
  • Posts: 6
how about a utility to give the 'unix/linux' type feature of right clicking on the desktop to get an application menu (only use the middle click or ctl+right click)?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #1 on: April 04, 2008, 03:16 AM »
previously there was a tool that could do this. it was called Start Or Switch but i'm not sure whether it still works in newer OSes such as WinXP, 2K, etc.
« Last Edit: April 04, 2008, 03:44 AM by lanux128 »

xunil

  • Participant
  • Joined in 2008
  • *
  • Posts: 6
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #2 on: April 04, 2008, 09:52 PM »
previously there was a tool that could do this. it was called Start Or Switch but i'm not sure whether it still works in newer OSes such as WinXP, 2K, etc.

looks like that project is dead.  could not download nor could i find it with google :(

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #3 on: April 05, 2008, 12:07 AM »
For this job, i'd recomment something like bb4win, which is a shell that mimics linux's fluxbox. If there's a way to do it without having to change the shell, it'd be preferable, though.

xunil

  • Participant
  • Joined in 2008
  • *
  • Posts: 6
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #4 on: April 05, 2008, 12:36 AM »
actually, i used to use bblean and this is the only feature i miss... but i have no desire to run an alternative shell just to get a handy launching feature.  i guess i will have to keep making the long trek to the bottom of my screen to launch an application (which is really annoying w/ dual monitors).

nite_monkey

  • Member
  • Joined in 2006
  • **
  • Posts: 753
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #5 on: April 09, 2008, 03:58 AM »
If you knew how to make an autohotkey script that when you click the middle mouse button, it would push the windows key, and then somehow move the start menu to where the mouse is, that would work, I could do part of that, but I dunno if I could make the start menu move to the mouse.
[Insert really cool signature here]

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #6 on: April 09, 2008, 04:47 AM »
on another note, you can call up Farr with the middle-click and launch your programs. ;)

xunil

  • Participant
  • Joined in 2008
  • *
  • Posts: 6
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #7 on: April 11, 2008, 08:58 PM »
If you knew how to make an autohotkey script that when you click the middle mouse button, it would push the windows key, and then somehow move the start menu to where the mouse is, that would work, I could do part of that, but I dunno if I could make the start menu move to the mouse.

i used autohotkey to launch shortpopup... which works well!  thanks!

shortpopup is here... http://www.digitallis.co.uk/pc/downloads.html
autohotkey is here... http://www.autohotkey.com/

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #8 on: April 13, 2008, 03:02 AM »
how about posting a working example? it'd be useful to someone else down the road. :)

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 2,026
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #9 on: April 13, 2008, 06:47 AM »
IntelliPoint 6.2 can do this with any mouse with a middle click.
Any button can start a program.
Set the options when setting up to 'Optical Mouse'.
And it will work with any three button mouse I know of.

http://www.filehippo.com/download_intellipoint/

Note bottom left corner of screenshot.


xunil

  • Participant
  • Joined in 2008
  • *
  • Posts: 6
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #10 on: April 13, 2008, 10:44 PM »
i had tried intellipoint, but it did not work with my mouse (which is just your average Dell usb mouse).  then i tried X-Mouse Button Control, which did work, but it is uses up about 10 mb ram.  autohotkey only uses about 3 mb ram...  and it can also be used for so much more.

i'll post my autohotkey script tomorrow, with some basic instructions on using shortpopup.

xunil

  • Participant
  • Joined in 2008
  • *
  • Posts: 6
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #11 on: April 15, 2008, 12:59 AM »
ShortPopUp (http://www.digitallis.co.uk/) and AutoHotkey can be used together to get a LINUX like menu… middle click (instead of right click) to get a menu of your applications.  to use ShortPopUp all you do is create a folder (lets say... \My Documents\SPU) and place shortcuts (or files or folders) inside along with the ShortPopUp.exe (you need to tell ShortPopUp what folder to start in, so techniclly it does not have to be in the same folder).  anything inside here will show up in the menu when ShortPopUp is called.  folders can be expanded, so you can place a shortcut to your start menu folder to get all of your applications.  see the help file for all of its features.  here is how I use it with AutHotkey...

--------------------------------------------------
AutoHotkey script...

;ShortPopUp Access
~MButton:: ;middle mouse button
    Process, Priority, , High
    Run, %A_MyDocuments%\SPU\ShortPopUp.exe -useinifile shortpopup.ini, %A_MyDocuments%\SPU
return

!Space:: ;Alt+Space (in case your hands are already on the keyboard)
    Process, Priority, , High
    Run, %A_MyDocuments%\SPU\ShortPopUp.exe -useinifile shortpopup.ini, %A_MyDocuments%\SPU
return
--------------------------------------------------
ShortPopUp ini file (shortpopup.ini), place in the same folder as ShortPopUp.exe...

-sort 2
-display 3 xp flat rounded
-dieonmouseout 1000
-menusforshortcutstofolders
-noavailablecheck
-dothumbnailsontooltip
-iconsforfolders
-block ".ini"
-maxmenuwidth 500
-menuxalignment left
-menuyalignment top
--------------------------------------------------

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,840
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #12 on: April 15, 2008, 01:27 AM »
there have been a number of AHK scripts that do what you want (I'm thinking of some snazzy radial versions which I unfortunately can't find at the moment)

The attached script (by Rajat) will do what you want

target
Alcohol is photoshop, bottled
Askhole - someone who ask for advice, then ignores it
"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #13 on: April 27, 2008, 03:09 PM »
previously there was a tool that could do this. it was called Start Or Switch but i'm not sure whether it still works in newer OSes such as WinXP, 2K, etc.

looks like that project is dead.  could not download nor could i find it with google :(

http://azores.globat.com/~pricelesswarehome.org/ftp/Programs/sosmenu.zip

Signy

  • Participant
  • Joined in 2012
  • *
  • Posts: 1
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #14 on: April 02, 2012, 10:42 AM »
If you knew how to make an autohotkey script that when you click the middle mouse button, it would push the windows key, and then somehow move the start menu to where the mouse is, that would work, I could do part of that, but I dunno if I could make the start menu move to the mouse.
Nice idea.

I started using ShortPopUp for All programs from StartMenu, but unfortunately ShortPopUp has a bug on multi-monitor screen (my case).

Luckily I use Classic shell http://classicshell.sourceforge.net/ and it's StartMenu replacement has ahk_class, so moving whole menu is possible.
I'm still using ShortPopUp on middle click on desktop for my favourite folders, so I use right click on desktop for StartMenu.

Bellow in Spoiler is AutoHotKey script, which:
  • works with Classic shell StartMenu,
  • works on multi-monitor desktop,
  • right click on desktop -> opens StartMenu and moves it to mouse pointer,
  • CTRL + right click on desktop -> works as usual right click on desktop,

Click to show AutoHotKey script
Spoiler (click to show/hide)
Code
#SingleInstance force
DetectHiddenWindows, on
Process, Priority, , AboveNormal 

;--------------------------------------------------------
; Classic shell desktop - use right button click on desktop and 
; you get ClassicShell menu.
;    If you need right click on desktop, use CTRL + right
; click instead.

; This script works for Classic shell start menu replacement
; http://classicshell.sourceforge.net/

RButton::
  CoordMode, Mouse, Screen			; Absolute position
  MouseGetPos, Xpos, Ypos, id, control
  WinGetClass, class, ahk_id %id%
  if (class == "Progman")			; Mouse is above desktop
  { 
		; Set desired initial menu position
		;    "Top" - mouse pointer is going to be on top left corner menu, default value
		;    "Bottom" - mouse pointer is going to be on bottom left corner menu
		;    "Middle" - mouse pointer is going to be in the middle of menu left side
		InitialMenuPosition := "Middle"
		StateProgman := 1   	; For right click down + move
        
		Send {RWin}				; Open StartMenu
        WinWaitActive, ahk_class ClassicShell.CMenuContainer
        #IfWinActive ahk_class ClassicShell.CMenuContainer
        WinGetPos, , , Xsize, Ysize, ahk_class ClassicShell.CMenuContainer
        SysGet, MonitorCount, 80 				; Number of monitors
        Sysget, MonitorPrimary, MonitorPrimary 	; Primary monitor number
        Loop %MonitorCount%
        {
	        ; Primary working area, could be changed for primary monitor with taskbar
	        SysGet, Monitor, Monitor, %A_Index% 					; Maximal monitor area
	        if ( Xpos >=MonitorLeft and Xpos <= MonitorRight 
	             and Ypos >=MonitorTop and Ypos <= MonitorBottom ) 	; Mouse pointer is inside this monitor
	        {
		        SysGet, MonitorWorkArea, MonitorWorkArea, %A_Index%	; Working area without not hiding taksbar
		        WorkLeft := MonitorWorkAreaLeft
				WorkTop := MonitorWorkAreaTop
				WorkRight := MonitorWorkAreaRight
				WorkBottom := MonitorWorkAreaBottom
				; Test smaller work area - for auto-hide taskbar
				if ( A_Index ==  MonitorPrimary and MonitorLeft == MonitorWorkAreaLeft 
				     and MonitorTop == MonitorWorkAreaTop and MonitorRight == MonitorWorkAreaRight 
				     and MonitorBottom == MonitorWorkAreaBottom )		; Primary monitor with auto-hide taskbar
		        {
			        WinGetPos,TaskX,TaskY,TaskW,TaskH,ahk_class Shell_TrayWnd,,,	; Where is taskbar?
			        if (TaskW >= A_ScreenWidth) { 							; Vertical Taskbar
					    if (TaskY <= 0) {
					      WorkTop := MonitorWorkAreaTop + TaskH
					    } else {
					      WorkBottom := MonitorWorkAreaBottom - TaskH
					    }
					} else { 											; Horizontal Taskbar
					    if (TaskX <= 0) {
					      WorkLeft := MonitorWorkAreaLeft + TaskW
					    } else {
					      WorkRight := MonitorWorkAreaRight - TaskW
					    }
					}
				}
	        }
    	}
    	; Window position
    	Xwin := Xpos							; Initial X value for window position
        if ( InitialMenuPosition == "Bottom" ) 
			Ywin := Ypos - Ysize 
		else if ( InitialMenuPosition == "Middle" ) 
			Ywin := Ypos - Ceil( Ysize/2 ) 
		else 									; Default = "Top"
    		Ywin := Ypos 						; Initial Y value for window position
    	; Whole window on visible part of selected monitor
    	if ( Xwin < WorkLeft )
			Xwin := WorkLeft
		if ( Xwin > WorkRight - Xsize )
			Xwin := WorkRight - Xsize
    	if ( Ywin < WorkTop )
			Ywin := WorkTop
		if ( Ywin > WorkBottom - Ysize )
			Ywin := WorkBottom - Ysize
        WinMove, ahk_class ClassicShell.CMenuContainer, , Xwin, Ywin	; Move opened window
		#IfWinActive
	    Return
    }
  else ; (class != "Progman")		Right click for another programs intact
    { 
		; Right click + move http://www.autohotkey.com/forum/topic19826.html
		; Many thanks to original autor YMP
		CoordMode, Mouse, Screen 
		MouseGetPos, mX0, mY0 
		Loop 
		{ 
		    Sleep, 20 
		    If not GetKeyState("RButton", "P")
		      Break 
		    MouseGetPos, mX, mY 
		    dX:=Abs(mX-mX0), dY:=Abs(mY-mY0) 
		    If (dX>3 or dY>3) 
		    { 
		        Move:=1 
		        Click Down Right
		        KeyWait, RButton 
		        Click Up Right
		        Break 
		    } 
		  } 
    }
  Return



RButton Up:: 
  If not Move		; For right click without move
  {
	  If not StateProgman
	  		Click Right
	  else
	  		StateProgman := 0
  }
  
  Else 
    Move:=0
Return


;--------------------------------------------------------
; CTRL-right click on desktop = right click
^RButton:: 
  MouseGetPos, , , id, control
  WinGetClass, class, ahk_id %id%
  if (class == "Progman")		; Click on desktop: CTRL-RightClick -> RightClick
    { 
	    ; Right click + move http://www.autohotkey.com/forum/topic19826.html
		; Many thanks to original autor YMP
		CoordMode, Mouse, Screen 
		MouseGetPos, mX0, mY0 
		Loop 
		{ 
		    Sleep, 20 
		    If not GetKeyState("RButton", "P")
		      Break 
		    MouseGetPos, mX, mY 
		    dX:=Abs(mX-mX0), dY:=Abs(mY-mY0) 
		    If (dX>3 or dY>3) 
		    { 
		        Move:=1 
		        Click Down Right
		        KeyWait, RButton 
		        Click Up Right
		        Break 
		    } 
		  } 
    	Return
    }
 else
   { 
	 Send ^{Click right}  ; CTRL+RightClick
     return
   }
Return

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #15 on: April 12, 2012, 12:50 AM »
I don't have multiple monitors. But I took the simpler approach of just moving the mouse to the Start Orb and clicking. It should calculate the correct position to click no matter what edge the Taskbar is on.

As it is the middle mouse click will only fire if Desktop is the active window. You may have to left click the desktop first to make sure it's active. Or as noted in the comments, you may comment out that limitation. A middle click anywhere would trigger it.

edit: I've modified the calculations. I pasted in the new version. Instead of adjusting x and y from the work area outward I changed the calculation from screen res inward. That way it should still work even if the work area has been shrunk via an Adjust Work Area type utility.

The code makes the assumption that Taskbar AutoHide is disabled. Otherwise the Get Work Area API won't tell you which edge has the Taskbar. Some other fancier detection would be required. But this is a pretty good starting point for step-wise enhancement.


Code
#SingleInstance ignore
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
x := 0
y := 0
_EmptyWorkingSet()

; DesktopGroup limits Middle Mouse Click to firing
; when the Desktop is the active window.

; comment out the next 3 lines to make hotkey global
GroupAdd,DesktopGroup, ahk_class Progman
GroupAdd,DesktopGroup, ahk_class WorkerW
#IfWinActive ahk_group DesktopGroup
MButton::
  if !_StartButtonXY(x, y)
    return
  MouseClick, left, %x%, %y%
return

;-------  helper functions  --------

_StartButtonXY(ByRef xpos, ByRef ypos)
{
  wl := 0
  wt := 0
  wr := 0
  wb := 0
  if !_GetWorkArea(wl, wt, wr, wb)
    return 0
  if (wl > 0) || (wt > 0)
  {
    xpos := 30
    ypos := 30
  }
  else if (wr < A_ScreenWidth)
  {
    xpos := A_ScreenWidth - 30
    ypos := 30
  }
  else
  {
    xpos := 30
    ypos := A_ScreenHeight - 30
  }
  return 1
}

_GetWorkArea(ByRef left, ByRef top, ByRef right, ByRef bottom)
{
  VarSetCapacity(work_area,16,0)
  success := DllCall( "SystemParametersInfo", "uint", 0x30, "uint", 0, "uint", &work_area, "uint", 0 )
  if success =
  {
    return 0
  }
  left := NumGet(work_area,0)
  top := NumGet(work_area,4)
  Right := NumGet(work_area,8)
  Bottom := NumGet(work_area,12)
  return 1
}

_EmptyWorkingSet()
{
  return DllCall("psapi.dll\EmptyWorkingSet", "UInt", -1)
}
« Last Edit: April 12, 2012, 07:01 AM by MilesAhead »

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #16 on: April 12, 2012, 05:40 PM »
I have an app that I had made called Start Anywhere. Press the Middle mouse button and it shows the windows Start Menu at the cursor location. Sorry it doesn't work on multi monitors, still working on that part. If anyone is interested in it, I'll smooth it out and post it.

bob99

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 345
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #17 on: April 12, 2012, 07:02 PM »
Is it possible to make some type of pop-up of all or part of the system tray with middle click?  With some programs minimizing there, (Screenshot Captor, Clipboard Help & Spell, Ethervane Echo,ClipTrap...etc) at times it would be easier to bring the tray up at the cursor.  For instance, if I'm on an external monitor to the left of my laptop and the tray's waaaaay over on the right  ;)
I've looked around from time to time, usually after I've been doing at lot of right clicks in the system tray on a project, but haven't found anything that says it will do the system tray.  Maybe it isn't even doable?

« Last Edit: April 12, 2012, 07:03 PM by bob99 »

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #18 on: April 12, 2012, 07:47 PM »
Might be able to do that. I'll look into it and get back to you.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • Participated in NANY Challenge Six Times
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #19 on: April 12, 2012, 08:41 PM »
Sorry, doesn't look like I am able to do that. I can hook the tray and move it once, then my system get's unstable.  :( Sorry about that. Maybe someone else will have better luck.

bob99

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 345
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #20 on: April 12, 2012, 08:56 PM »
Very well could be why I haven't been able to find anything. The system tray is designed to stay where it is and as it is. Thanks for trying.  :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #21 on: April 12, 2012, 09:01 PM »
Tray and Taskbar are touchy. On one of the AutoIt or AHK forums a person running games in full screen mode wanted to be able to tell if the Taskbar was showing. The solution ended up being this involuted deal where the function got the position of all windows and checked the z order to see if Taskbar was on top and inside the screen res. MS seems to change how you deal with Taskbar on every release. Sometimes it hides it by moving it off screen. The only sane way I've found is just stipulate AutoHide must be disabled. I tried hooking into system settings change. Works for screen res change but it seems useless for Taskbar settings change. It's pretty difficult.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #22 on: April 12, 2012, 09:03 PM »
On this subject I'm wondering if anyone tried Vista Start Menu freeware. I know it can be set to open on the right hand side. I used it for awhile. But I never tried to move it dynamically using code. Might be possible.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #23 on: April 12, 2012, 09:29 PM »
Sorry, doesn't look like I am able to do that. I can hook the tray and move it once, then my system get's unstable.  :( Sorry about that. Maybe someone else will have better luck.

Doubtful.  As MilesAhead mentioned, working with the tray is extremely touchy.  Basically, to do it right, you have to load BEFORE any icons get populated into the tray in order to capture them all.  Some icons do periodic refreshing and, thus, will populate even if you hook after they've been created.  Now, after all this, it's still touch and go to get the icon handling right.

bob99, one thing you might consider is an old utility by AM Productions called Tray Module.  I used to use it for various things back in the day.  The site is no longer, but you can still get the utility via the Wayback Machine here:

http://web.archive.org/web/20050308111319/http://am-productions.yi.org/getprod.php?pcode=TrayModule

It's a tiny, portable app that will give you a free-floating systray.  Now, as I mentioned before, to capture tray icons properly, you should try to get this loaded as soon as you can on system startup.  You could try using a simple shortcut in your Startup group and see what icons it captures after a reboot.  Maybe it will capture the ones you'd like to deal with.  Worth a try, anyway.  =]

Also, there are a few other really neat utilities on that site...

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: IDEA: middle click on desktop to get quick launch or 'start menu'
« Reply #24 on: April 12, 2012, 10:01 PM »
Not to pimp my own software, but one way you can try to load this utility before items in the tray, is use RunIt to run via the Registry setting. Also you can delay loading apps that use icons in the Tray by adding them with DelayedCuts.  Both may be downloaded from this page:

http://www.favessoft.com/downloads.html

I use DelayedCuts to load most of my Tray Apps that sit waiting for a hotkey press.
The DelayedLoad program that actually launches the apps on logon shows a slide-up dialog as it loads each delayed program. The dialog may be disabled via the .ini file setting. Just set UseToast to 0 or False. In that case it will show a tooltip with countdown to the next program load when you hover the mouse on its tray icon.

Original address: https://www.donationcoder.com/forum/index.php?topic=12931.0