Selecting rows with Middle Mouse Button

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Selecting rows with Middle Mouse Button

Post by Thy Grand Voidinesss »

Is it possible to set some key or button to serve as a equivalent to
CTRL + LMB
? I would like to to be able to select items spaced out by other rows when using only mouse i.e. by clicking
MMB


And if its not possible then can this be implemented; and in the meanwhile maybe someone already has a tested AHK script that does this without issues?
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Selecting rows with Middle Mouse Button

Post by void »

There's no option in Everything to toggle the selection on middle mouse click.

I will consider an option to do this.

Thank you for the suggestion.

The middle mouse button in Everything scrolls the view.
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Selecting rows with Middle Mouse Button

Post by vsub »

Do you mean something like this

Code: Select all

#IfWinActive,AHK_class EVERYTHING
$MButton::
MouseGetPos,,,,Control
If (Control = "SysListView321")
{
Send,{LCtrl Down}{LButton Down}
Keywait,% A_ThisHotkey
Send,{LCtrl Up}{LButton Up}
Return
}
Else
{
Send,{MButton Down}
Keywait,% A_ThisHotkey
Send,{MButton Up}
}
Return
Setting the MButton as the hotkey,you will lose the ability to auto scroll and it will also work better if you have Full row select enabled
And of course,the window need to be active first for the hotkey to start working
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Selecting rows with Middle Mouse Button

Post by Thy Grand Voidinesss »

vsub wrote: Fri May 03, 2024 11:19 am Do you mean something like this
[...]
Thank you, but this does not work


When I asked my question I already have been using such scripts for other programs - but there were always some issues when writing them; and thus I was hoping that someone already had overcame them for Everything. Because, as it turns now, something like this

Code: Select all

#If WinActive("ahk_exe Everything.exe") && mouseOver("ahk_exe Everything.exe", "SysListView321")

MButton Up::
    Send ^{LButton}
Return

mouseOver(winTitle, ctl)
    {
    If !WinExist(winTitle)
    Return false
    MouseGetPos,,, hWnd, overCtl
    Return overCtl = ctl
    }

ProcessExist(exeName)
    {
    Process, Exist, %ExeName%
    Return ErrorLevel
    }
does work - but not if you also quickly move to pointer horizontally right after a MMB click. And that is because a small menu can appear; or even worse as apparently a process from that menu can be selected and thus begin

For now I will leave it as it is because I do not wish to indulge in having another AHK induced headache, as I am not a programmer


vsub wrote: Fri May 03, 2024 11:19 am Setting the MButton as the hotkey,you will lose the ability to auto scroll
[...]
Never used it and never will as it is plain unusable- its either too slow or too quick; overall being chaotic. The mouse wheel and its side scroll is all I need. And apparently I must have already turned auto scroll off in Everything a long time ago, as I do not experience it nor recall it

vsub wrote: Fri May 03, 2024 11:19 am [...]
And of course,the window need to be active first for the hotkey to start working
Now that is something I have been struggling to overcome multiple times for various programs - but at least in case of Everything this will not be a problem for me, as I always use it with a maximized window [thus whenever I need something from it/ switch to it I automatically apply focus to it]
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Selecting rows with Middle Mouse Button

Post by vsub »

@Thy Grand Voidinesss your code is allowing the mouse down state to be detected as normal and that can case problems,mine does not(unless Everything is running as admin and the script is not)

Just curious,what exactly is the prolem with my script?
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Selecting rows with Middle Mouse Button

Post by Thy Grand Voidinesss »

It does not work i.e. nothing gets selected

And yes, all of my AHK scripts are being run as Administrator; and no, during tests I have nothing that could interfere with this one
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Selecting rows with Middle Mouse Button

Post by void »

You might be using Everything64.exe, please try the following:

#If WinActive("ahk_class EVERYTHING_(1.5a)") && mouseOver("ahk_class EVERYTHING_(1.5a)", "SysListView321")
Last edited by void on Tue May 07, 2024 8:04 am, edited 1 time in total.
Reason: EVERYTHING => EVERYTHING_(1.5a)
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Selecting rows with Middle Mouse Button

Post by Thy Grand Voidinesss »

Yes, I am using x64

But this

Code: Select all

#If WinActive("ahk_class EVERYTHING") && mouseOver("ahk_class EVERYTHING", "SysListView321")

MButton Up::
    Send ^{LButton}
Return

mouseOver(winTitle, ctl)
    {
    If !WinExist(winTitle)
    Return false
    MouseGetPos,,, hWnd, overCtl
    Return overCtl = ctl
    }

ProcessExist(exeName)
    {
    Process, Exist, %ExeName%
    Return ErrorLevel
    }
also does nothing
void
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Selecting rows with Middle Mouse Button

Post by void »

The following worked for me:

Code: Select all

#If WinActive("ahk_class EVERYTHING_(1.5a)") && mouseOver("ahk_class EVERYTHING_(1.5a)", "SysListView321")
MButton Up::
    Send ^{LButton}
Return

mouseOver(winTitle, ctl)
    {
    If !WinExist(winTitle)
    Return false
    MouseGetPos,,, hWnd, overCtl
    Return overCtl = ctl
    }
   
vsub
Posts: 474
Joined: Sat Nov 12, 2011 11:51 am

Re: Selecting rows with Middle Mouse Button

Post by vsub »

Thy Grand Voidinesss wrote: Mon May 06, 2024 8:10 pm It does not work i.e. nothing gets selected

And yes, all of my AHK scripts are being run as Administrator; and no, during tests I have nothing that could interfere with this one
Strange,works fine here
I middle click on the list and every time I middle click it's like I am holding control and left clicking on the row so I can select dufferent rows and keep the selection the next time I click on another row
I am using the lastest beta of everything and the x64 version of autohotkey

Just for a test,remove this
#IfWinActive,AHK_class EVERYTHING
part,this will make the middle click to work globally,the point is to see if the first condition is the problem
horst.epp
Posts: 1448
Joined: Fri Apr 04, 2014 3:24 pm

Re: Selecting rows with Middle Mouse Button

Post by horst.epp »

void wrote: Tue May 07, 2024 8:03 am The following worked for me:

Code: Select all

#If WinActive("ahk_class EVERYTHING") && mouseOver("ahk_class EVERYTHING", "SysListView321")
MButton Up::
    Send ^{LButton}
Return

mouseOver(winTitle, ctl)
    {
    If !WinExist(winTitle)
    Return false
    MouseGetPos,,, hWnd, overCtl
    Return overCtl = ctl
    }
   
This works for me too (I have removed the Alpha extension).
______________________________________________________
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3
AutoHotkey v1.1.36.02, 2.0.14
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Selecting rows with Middle Mouse Button

Post by Thy Grand Voidinesss »

Well now it works

I have slightly adjusted it:

Code: Select all

#If WinActive("ahk_class EVERYTHING_(1.5a)") && Focus_is_on_Everything ("ahk_class EVERYTHING_(1.5a)", "SysListView321")
MButton Up::
    Send ^{LButton}
    Sleep 123
Return

Focus_is_on_Everything(winTitle, ctl)
    {
    If !WinExist(winTitle)
    Return false
    MouseGetPos,,, hWnd, overCtl
    Return overCtl = ctl
    }
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: Selecting rows with Middle Mouse Button

Post by Thy Grand Voidinesss »

Nevertheless I would be better if this got implemented to Everything
void wrote: Fri May 03, 2024 9:19 am There's no option in Everything to toggle the selection on middle mouse click.

I will consider an option to do this.
[...]
And that is because using workaround in form of AutoHotkey [or any other script program for that matter] is a no-go for most users
Post Reply