ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Middle click without using scrollwheel button

<< < (2/3) > >>

jgpaiva:
The mouse hook monitors mouse clicks for the purpose of activating mouse hotkeys and facilitating hotstrings. It is not supported under Windows 95/98/Me because those operating systems require a different type of hook that must reside in a DLL file.
-ahk help file
--- End quote ---
:(

Ok, but i tried anyways. Here's the code:

--- ---; Author:         jgpaiva
;
; Script Function: replace double-right click by middle click
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


rbutton::
keywait,rbutton,T0.1
if(errorlevel != 0){
Send,{rbutton down}
keywait,rbutton
Send,{rbutton up}
return
}
keywait,rbutton,D T0.1
if(errorlevel = 0)
Send,{mbutton}
else
Send,{rbutton}
return

f11::exitapp

I recommend you keep that last line, so that you can close the script by pressing F11, in case it goes wrong (and takes your right-click away). It should work well (at least, it does here).
To modify the timeout for the double-click, change the "0.1" to something larger or smaller.

ps: This is actually fun to play with! :D

[edit] removed a debug tooltip [/edit]

app103:
Doesn't seem to work at all here. No effect, good, bad, or otherwise. :(


The mouse hook monitors mouse clicks for the purpose of activating mouse hotkeys and facilitating hotstrings. It is not supported under Windows 95/98/Me because those operating systems require a different type of hook that must reside in a DLL file.
-ahk help file
--- End quote ---

That's why I didn't do this myself in Delphi. I haven't had that much luck coding keyboard/mouse hooks because I can't seem to wrap my head around the whole .dll thing to make it work.

Edit: Typonese to English translation  :-[

lanux128:
if you don't mind using your keyboard, then you can try Numpad Mouse or Mouse Emulator. both programs can 'simulate' middle-clicks from the keyboard.

Source: https://www.donationcoder.com/forum/index.php?topic=12078.0

app103:
Nevermind about this coding snack. I discovered I really don't need it, after all.

Shift+left click wasn't what I wanted since it opened the tab in the foreground but...

Ctrl+left click opens it in the background, like I wanted, like a middle click would do.

Not being a keyboard freak, I really don't know this stuff. I thought ctrl+left click was for over-riding the popup blocker when a link wants to open in a new window and the popup blocker wants to prevent it from opening at all.  :-[

Oh well...at least 2 of us learned something in the process: I learned about what ctrl+left click really does, rjbull and found his "missing" middle mouse button.  :D

lanux128:
In fact, I've just this minute realised that the scrollwheel doubles as the apparently missing middle mouse button...-rjbull (July 02, 2008, 04:05 AM)
--- End quote ---

@rjbull: if you had stayed "un-realised" then you'd endeared yourself to many in this thread. ;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version