Dual-pane Explorer

Discussion in 'Scripting' started by freddie-o, Sep 17, 2019.

  1. freddie-o

    freddie-o MDL Addicted

    Jul 29, 2009
    595
    635
    30
    #1 freddie-o, Sep 17, 2019
    Last edited: May 10, 2020
    Introduction:
    • This AutoIt script automates opening 2 instances of Windows Explorer and "Show windows side by side".
    • When multitasking in Windows Explorer, it is more convenient using dual-panes.
    • I tried almost every dual-pane File Manager -- but I still prefer Windows Explorer to do tasks in Windows.
    • Prior to this I just open 2 instances of Windows Explorer then snap them side by side.



    Disclaimer:

    I am not the original author of this script. I just discovered it and slightly tweaked it.




    Download:

    AutoIt (To convert this AU3 script to EXE)




    How To:
    1. Install AutoIt (or extract if you downloaded the portable zip version.)
    2. Open SciTE Script Editor
    3. Copy and paste a script below
    4. Save as “Dual-pane Explorer.au3” (or whatever name you choose, as long as the extension is "au3")
    5. You can test “Run Script” using AutoIt3
    6. “Compile Script to .exe” using Aut2exe (Have an icon ready for your exe.)



    Script:
    Code:
    Local $hRun1 = _Run('Explorer.exe', 0, 0, @DesktopWidth/2, @DesktopHeight - 40)
    Local $hRun2 = _Run('Explorer.exe', @DesktopWidth/2, 0, @DesktopWidth/2, @DesktopHeight - 40)
    
    Func _Run($sRunCommand, $iX, $iY, $iW, $iH)
        Local $aWinList_Before = WinList("[CLASS:CabinetWClass]")
        Run($sRunCommand)
        Do
            $aWinList_After = WinList("[CLASS:CabinetWClass]")
        Until $aWinList_After[0][0] > $aWinList_Before[0][0]
        Local $hWnd = $aWinList_After[1][1]
        Sleep(1000)
        WinMove($hWnd, "", $iX, $iY, $iW, $iH)
    EndFunc