mouse wheel click open folder in a new tab

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: mouse wheel click open folder in a new tab

Post 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)
OS: Win10 | TC: latest x64
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mouse wheel click open folder in a new tab

Post by *Fla$her »

Have the limitations from below been taken into account?
I advise to check with MsgBox instead of ShowPopupMenu /I:16.
Overquoting is evil! 👎
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: mouse wheel click open folder in a new tab

Post 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
OS: Win10 | TC: latest x64
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mouse wheel click open folder in a new tab

Post by *Fla$her »

2KozakMak
Doesn't work in brief mode either?
Overquoting is evil! 👎
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: mouse wheel click open folder in a new tab

Post 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:
OS: Win10 | TC: latest x64
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mouse wheel click open folder in a new tab

Post 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
Overquoting is evil! 👎
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: mouse wheel click open folder in a new tab

Post by *KozakMak »

Jesus Christ! :shock:
Spoiler
that what she said
OS: Win10 | TC: latest x64
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mouse wheel click open folder in a new tab

Post by *Fla$her »

And how should I take this reaction? :roll:
Overquoting is evil! 👎
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: mouse wheel click open folder in a new tab

Post by *KozakMak »

OS: Win10 | TC: latest x64
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: mouse wheel click open folder in a new tab

Post 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?
OS: Win10 | TC: latest x64
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mouse wheel click open folder in a new tab

Post 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
Overquoting is evil! 👎
Post Reply