Page 7 of 7

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 08:43 UTC
by KozakMak

Code: Select all

LoadLibrary Plugins\Autorun_Runtime.dll
LoadLibrary Plugins\Autorun_Tweaks.dll

ControlSetMouseAction /M 1 OpenDirInNewTabElseEnter
ControlSetMouseAction /M 2 OpenDirInNewTabElseEnter

Func OpenDirInNewTabElseEnter
   I = ItemAtCursor('index')
   If I >= 0 Then
      F = RequestInfo(1010 + ItemAtCursor('panel'))
      If ItemAtCursor('panel') <> RequestInfo(1000) Or Not ItemAtCursor('focused') Then MouseClick
      If ItemAtCursor('focused') Then
         If F > I Or F = -1 Then
            SendCommand 3003
         Else
            Switch StrLower(StrRight(ItemAtCursor('text'), 4))
               Case '.exe'
                  ShowPopupMenu /I:16 '%commander_path%\Buttonbar\CLICK.BAR'
               Case '.jpg', '.png'
                  ShowPopupMenu /I:16 '%commander_path%\Buttonbar\IRFAN.BAR'
            EndSwitch
         EndIf
      EndIf
   EndIf
EndFunc
dir - work, file - show nothing
Win10 x64, TC 10.52 x64
Autorun 2.2.10 beta (dll)

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 09:03 UTC
by Fla$her
Have the limitations from below been taken into account?
I advise to check with MsgBox instead of ShowPopupMenu /I:16.

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 10:09 UTC
by KozakMak
Fla$her wrote: 2023-03-29, 09:03 UTC Have the limitations from below been taken into account?
I know about limitations. My simple ShowPopupMenu /I:16 CLICK.BAR work fine.
Something wrong with Switch..Case code
Fla$her wrote: 2023-03-29, 09:03 UTC I advise to check with MsgBox instead of ShowPopupMenu /I:16.
same here - without Switch..Case it works correct
and with Switch..Case do nothing

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 14:44 UTC
by Fla$her
2KozakMak
Doesn't work in brief mode either?

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 15:59 UTC
by KozakMak
Fla$her wrote: 2023-03-29, 14:44 UTC Doesn't work in brief mode either?
omg, it works on brief mode :shock:

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 16:07 UTC
by Fla$her
Add the highlighted:
Switch StrLower(StrRight(StrPart(ItemAtCursor('text'), auTAB, 1), 4))


P. S.:
Now it makes no sense to write Enter in OpenDirInNewTabElseEnter.
Better like this: OpenDirInNewTabElseShowMenu

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 16:16 UTC
by KozakMak
Jesus Christ! :shock:
Spoiler
that what she said

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 16:22 UTC
by Fla$her
And how should I take this reaction? :roll:

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 16:24 UTC
by KozakMak

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 16:39 UTC
by KozakMak
ha! new (and you say "It's stupid." (c)) idea! :D
how about showing dir menu (with my custom .bar) when clicking wheel on EMPTY space?

Re: mouse wheel click open folder in a new tab

Posted: 2023-03-29, 16:57 UTC
by Fla$her
Replace the bottom two lines of code with:

Code: Select all

   Else
      SendCommand 526
   EndIf
EndFunc
KozakMak wrote: 2023-03-29, 16:39 UTCdir menu (with my custom .bar)
DirMenu is a section in the ini, it has nothing to do with bar files.
KozakMak wrote: 2023-03-29, 16:24 UTChttps://ibb.co/ZLPYggy
Click