Expand the Folder Tree when Clicked or Hovered, then revert when not

Would somebody be open to writing a script that can expand the pixel width of the Folder Tree Pane to, say 800px, when the mouse is hovering over the Folder Tree, and then revert it back to the original width (or a specified width, maybe like 300px) when the mouse leaves the Folder Tree?

If simply hovering over the Folder Tree Pane is not a valid trigger for such an event, perhaps the width adjustment could be activated only when a Folder Tree Item is hovered over and reduces when no item is hovered over, or when an empty space in the Folder Tree is clicked... then the pane shrinks back down once you click outside of the Folder Tree. Or, maybe a short timer to revert back after 1 sec once hovering is not longer detected? Any of these approaches would also work great, though a hovering trigger is preferred over clicking, if possible.

This request is inspired by the amazing script @WKen has so graciously just created, which opens and closes the Viewer Pane as you select and deselect images. I find that automating the process of activating panes when needed, then minimizing them when not actively in use is a major efficiency enhancement

For reference, @WKen's Viewer Pane Script I mentioned is, in case anybody else is into that sorta thing!
Viewer auto open close.js.txt (5.0 KB)

Anyhow, to anybody with an interest in this, thank you so much in advance!

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
}