Autohide folder tree by mouse

Share tools which are especially useful in combination with Opus.
User avatar
AlbatorV
Registered Opus Pro User
Posts: 1314
Joined: 20 Jan 2005, 08:47
OS: Windows 7 64-bit
Opus: Directory Opus 12
Location: Paris (France)
I've just create a little tool to show/hide folder tree by mouse.

You need to move mouse to the left border of Opus windows to show/hide folder tree.

You can exit tool by clicking icon in systray.

Image

Include : AutoIt script and executable
Attachments
Auto Hide Folder Tree Of Directory Opus.zip
(239.19 KiB) Downloaded 848 times

newguy
Registered Opus Pro User
Posts: 432
Joined: 04 Jan 2009, 21:49
OS: Windows 10 64-bit
Opus: Latest Beta

Postby newguy » 06 Jan 2009, 02:36

Nice tool. Though the timing should be adjusted if that's possible. Holding the mouse on the screen edge for too long makes the tree pop in and out of view repeatedly.

I think this should be built-in to Opus. Well, it would be better if a mouse click could open the tree, like the side bar in Opera.

User avatar
AlbatorV
Registered Opus Pro User
Posts: 1314
Joined: 20 Jan 2005, 08:47
OS: Windows 7 64-bit
Opus: Directory Opus 12
Location: Paris (France)

Postby AlbatorV » 06 Jan 2009, 06:22

So don't hold the mouse on the screen edge ;)
Now, script wait 500ms between each toogle... you can modify script and replace sleep(500) to sleep(2000) for 2s...

Beechhead
Registered Opus Pro User
Posts: 5
Joined: 15 Apr 2012, 02:32
OS: Windows 7 64-bit
Opus: Directory Opus 10
Thankx for this nifty little tool; works nicely in DO 10.
I noticed that it only work on a non-maximizied window. Is it my system or is it a known issue?

Thankx
Beechhead

User avatar
AlbatorV
Registered Opus Pro User
Posts: 1314
Joined: 20 Jan 2005, 08:47
OS: Windows 7 64-bit
Opus: Directory Opus 12
Location: Paris (France)
This old tool was create for XP and I'm sure that you have Vista or 7.
On XP, x position of mazimized window is 0, on Vista/7, it's -8. So script doesn't work.

So this line must be change from

Code: Select all

If $pos[0] > $size[0] and $pos[0] < $size[0]+6 and $pos[1] > $size[1]+$lister[1]+30 and $pos[1] < $size[1]+$size[3]-30 Then

to

Code: Select all

If $pos[0] > $size[0] and $pos[0] < $size[0]+12 and $pos[1] > $size[1]+$lister[1]+30 and $pos[1] < $size[1]+$size[3]-30 Then

Because if $size[0]=-8 then $size[0]+6=-2 and it's not possible to put mouse to x-2 so out of screen.
Attachments
Auto Hide Folder Tree Of Directory Opus.zip
(283.09 KiB) Downloaded 395 times

Beechhead
Registered Opus Pro User
Posts: 5
Joined: 15 Apr 2012, 02:32
OS: Windows 7 64-bit
Opus: Directory Opus 10
Pity, It works on a little notebook (1024x600) on W7. Unfortunately not on my desktop.
Thankx for explaining

WildBill
Posts: 1
Joined: 10 May 2014, 16:27
OS: Windows 7 64-bit
Opus: Directory Opus 11
Edit - Fixed size issues & added delay to the folder tree itself.
Edit - Updated to block being triggered if outside the unmaximized window
This AutoHotkey script I'm working on works for the folder tree + viewer, it will work on all Windows versions that AutoHotkey will run on. :)
To use it, just download AutoHotkey at http://www.autohotkey.com/
Make a new text file.
Paste the code and save and close it.
Change the extension from .txt to .ahk

1. Auto show the tree then close once you move outside of it.
2. Show the viewer if your mouse is in the area for 500MS but it will not close until you move your mouse out of the area and back another 500ms.

Code: Select all

#SingleInstance, Force
#Persistent
DetectHiddenWindows, On
#NoTrayIcon
CoordMode, Mouse, Relative
SetTimer, MGP, 50
Return

/*
$ESC:: ;For testing ignore. :P
ToolTip, Closing
Sleep, 1000
ExitApp
*/

MGP:
DPL = dopus.lister
IfWinActive, ahk_class dopus.lister
{
        WinGetClass, mC, ahk_id %fID%
        MouseGetPos, fX, fY, fID, fWin
        If(mC < > DPL) {
        Return
    }
    WinGetPos, dX, dY, dW, dH, ahk_classdopus.lister
    Gosub, VT
    ControlGet, CG, Enabled, , SysTreeView321, ahk_classdopus.lister
      If(CG = 1)
{
      ControlGetPos, tX, tY, tW, tH, SysTreeView321, ahk_class dopus.lister
    If(CG = 1 && fX > tW+50) {
        SetTimer, MGP, Off
        Sleep, 100
        SendInput, {F8}
        Sleep, 100
        SetTimer, MGP, On
        Return
    }
}
    If(fX < 8 && fY > 90 && fY < dH - 40) {
        SetTimer, MGP, Off
        Sleep, 375
        MouseGetPos, fX, fY, fID, fWin
        WinGetClass, mCC, ahk_id %fID%
        If(mCC <> DPL) {
        SetTimer, MGP, On
        Return
    }
        MouseGetPos, fX, fY
        Sleep, 125
        If(fX < 8 && fY > 90 && fY < dH - 40) {
        SendInput, {F8}
        }
        MouseGetPos, fX, fY
        Loop, {
            MouseGetPos, fX, fY
            If(fX > 475 && fY > 90) {
                CG = 0
                SetTimer, MGP, On
                Break
            }
            If(fX > 475 && fY < dH - 40) {
                Break
            }
        }
    }
}
Return

VT:
REV:= dW - 200
IfWinActive, ahk_classdopus.lister
{
    MouseGetPos, fX, fY, fID, fWin
    ControlGet, CGR, Enabled, , dopus.listerviewpane1, ahk_classdopus.lister
    If(CGR = 1 && fX < REV) {
        SetTimer, MGP, Off
        Sleep, 200
        SetTimer, MGP, On
        Return
    }
    If(fX > dW - 8 && fY > 90 && fY < dH - 40 && fY) {
        SetTimer, MGP, Off
        Sleep, 500
                MouseGetPos, fX, fY, fID, fWin
        WinGetClass, mCC, ahk_id %fID%
        If(mCC <> DPL) {
        SetTimer, MGP, On
        Return
    }
        If(fX > dW - 8 && fY > 90 && fY < dH - 40 && fY) {
            SendInput, {F7}
        }
        MouseGetPos, fX, fY
        Loop, {
            MouseGetPos, fX, fY
            If(fX < REV && fY > 90) {
                SetTimer, MGP, On
                Break
            }

        }
    }
}
Return


User avatar
BeeTeeEss
Registered Opus Pro User
Posts: 551
Joined: 14 Nov 2004, 15:44
OS: Windows 8 64-bit
Opus: Latest Beta
Location: Brisbane, Australia
As I have not implemented the above code, it may be that I am missing something quite special about its functionality.

However, based on the thread title alone, I thought I'd offer my 'Toggle Tree' button. I say ''my' button, because It is part of my standard layout, but I recall others (possibly Leo and/or Jon) played a part in its development, and perhaps others did too. It was a while ago. Which makes it sound like it must be complex, but nothing could be further from the truth. its main feature is its simplicity.

I have two layouts, one called 'My Default', and one called 'My Default - Tree'. As the names suggest, the only difference between them is the absence or presence of the folder tree. The rest of the layout is exactly the same, and in the same position in both layouts. The button code is:

Code: Select all

@ifset:TREE=toggle
Prefs LAYOUT "My Default" LAYOUTCLOSELISTERS=yes
@ifset:else
Prefs LAYOUT "My Default - Tree" LAYOUTCLOSELISTERS=yes


Jon's beautiful @ifset function is the key to achieving this elegant simplicity. I've thought about re-using this technique to toggle between any two layout sets. As yet, I have not actually done so, but it could be useful nonetheless.
Regards...

Bernard
You will care less about what people think of you when you realise how seldom they do. ~ Oscar Wilde

tdanielsson
Posts: 5
Joined: 10 Feb 2015, 10:15
OS: Windows 7 64-bit
Opus: Directory Opus 12
WildBill wrote:Edit - Fixed size issues & added delay to the folder tree itself.
Edit - Updated to block being triggered if outside the unmaximized window
This AutoHotkey script I'm working on works for the folder tree + viewer, it will work on all Windows versions that AutoHotkey will run on. :)
To use it, just download AutoHotkey at http://www.autohotkey.com/
Make a new text file.
Paste the code and save and close it.
Change the extension from .txt to .ahk

1. Auto show the tree then close once you move outside of it.
2. Show the viewer if your mouse is in the area for 500MS but it will not close until you move your mouse out of the area and back another 500ms.



Hi

I was looking after some way to autohide the folder tree and found this script, thanks for that :D , I have now tried it out with AutoHotkey and it seems to work.

But I have some issue with it, when Dopus is in fullscreen on my desktop (1920x1080) I cant get the mouse over the left/right border, so I cant view the Folder Tree/Panelview, but if I set Dopus in windowmode it works fine to view/hide, but I want to use Dopus in fullscreen instead.

So is it possible some how change something in the script so its working with Dopus in fullscreen?, scipting is not my cup of tea, Im not good on that :(

Sincerely
Thomas


Return to “Tools”