I happen to have seen this:
Autohide folder tree by mouse - Tools - Directory Opus Resource Centre (dopus.com)
I'm not familiar with AHK, removed some code.
#SingleInstance, Force
#Persistent
DetectHiddenWindows, On
#NoTrayIcon
;DOpusrt path
If (!DOpusrt)
{
IfExist, C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe
{
DOpusrt := "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
}
else IfExist, C:\Program Files\Directory Opus\dopusrt.exe
{
DOpusrt := "C:\Program Files\Directory Opus\dopusrt.exe"
}
else IfExist, D:\Program Files\GPSoftware\Directory Opus\dopusrt.exe
{
DOpusrt := "D:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
}
else IfExist, D:\Program Files\Directory Opus\dopusrt.exe
{
DOpusrt := "D:\Program Files\Directory Opus\dopusrt.exe"
}
else IfExist, D:\Tools\GPSoftware\Directory Opus\dopusrt.exe
{
DOpusrt := "D:\Tools\GPSoftware\Directory Opus\dopusrt.exe"
}
else IfExist, D:\Tools\Directory Opus\dopusrt.exe
{
DOpusrt := "D:\Tools\Directory Opus\dopusrt.exe"
}
else IfExist, E:\Program Files\GPSoftware\Directory Opus\dopusrt.exe
{
DOpusrt := "E:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
}
else IfExist, F:\Program Files\GPSoftware\Directory Opus\dopusrt.exe
{
DOpusrt := "F:\Program Files\GPSoftware\Directory Opus\dopusrt.exe"
}
else
{
MsgBox, dopusrt.exe is not found!`n`nPlease modify the path of dopusrt.exe in the ahk code
return
}
}
SetTimer, MGP, 50
Return
switch := ""
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
ControlGet, CG, Enabled, , SysTreeView321, ahk_classdopus.lister
SetTimer, MGP, Off
Sleep, 125
If(fX > 300 && fX < dW - 40 && fY > 90 && fY < dH - 40 && switch == 2) { ;Mouse hover area, fX > 300 && fX < dW - 40 refers to the X coordinate area from the left side of the window 300px to the right
run, %DOpusrt% /cmd Set FOLDERTREESIZE 300,300 ;Pass command to DOpus to resize tree to 300,300
switch := ""
}
If(fX < 300 && fX > 0 && fY > 90 && fY < dH - 40 && switch == "") { ;Mouse hover area, fX < 300 && fX > 0 refers to the X coordinate area 300px from the left side of the window to the right
run, %DOpusrt% /cmd Set FOLDERTREESIZE 800,300 ;Pass command to DOpus to resize tree to 800,300
switch := 2
}
Sleep, 125
SetTimer, MGP, On
Return
}