Possible using arrow keys to navigate next/previous files in XYplorer, previewing them automatically in "QuickLook" app?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
cadu
Posts: 287
Joined: 18 Mar 2012 21:50

Possible using arrow keys to navigate next/previous files in XYplorer, previewing them automatically in "QuickLook" app?

Post by cadu »

Hi. I'd appreciate your help.

By using this scrip from another XYplorer thread I could start previewing files in "QuickLook" app:

Code: Select all

run """C:\Apps\QuickLook\QuickLook.exe"" ""<curitem>""";
However "QuickLook" preview just works for that file that was selected when the XYplorer script ran.

As shown in this screen-recording (https://tinyurl.com/yyc6eh8x), when using "QuickLook" preview in Windows File Explorer, the selected file is previewed, and you can use keyboard arrow keys to navigate next/previous files which are previewed automatically in "QuickLook" (without the need of running a new instance of QuickLook).

Would it be possible using arrow keys to navigate next/previous files in XYplorer, previewing them automatically in "QuickLook" app (like in Windows Explorer)?

Thank you!
Carlos

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Possible using arrow keys to navigate next/previous files in XYplorer, previewing them automatically in "QuickLook"

Post by highend »

No, you can't redefine the arrow keys in XY so you can't bind them to a script.

Use AutoHotkey and write a script that takes over this part
One of my scripts helped you out? Please donate via Paypal


WirlyWirly
Posts: 195
Joined: 21 Oct 2020 23:33
Location: Through the Looking-Glass

Re: Possible using arrow keys to navigate next/previous files in XYplorer, previewing them automatically in "QuickLook"

Post by WirlyWirly »

Quicklook seems to do the same thing as xy's preview window (at least from what I gathered from your example recording).

As an altetnative you could use that, which does support arrow keys.

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: Possible using arrow keys to navigate next/previous files in XYplorer, previewing them automatically in "QuickLook"

Post by Norn »

1218.io or :arrow:
Last edited by Norn on 04 Sep 2022 08:25, edited 2 times in total.
Win10, Win11 @100% 2560x1440 22H2

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: Possible using arrow keys to navigate next/previous files in XYplorer, previewing them automatically in "QuickLook"

Post by Norn »

Code: Select all

;QuickLook
#NoEnv
#NoTrayIcon
#Persistent
#SingleInstance force

xyPath := "D:\XYplorer"
xyExe  := "XYplorer.exe"
xyID   := "ahk_class ThunderRT6FormDC ahk_exe " xyExe

right::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
        Send_WM_COPYDATA(xyHWnd, "::sel '+1'; run lax(""D:\Program Files\QuickLook-3.7.1\QuickLook.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }
return

left::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
        Send_WM_COPYDATA(xyHWnd, "::sel '-1'; run lax(""D:\Program Files\QuickLook-3.7.1\QuickLook.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }

return

down::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
	    WinActivate, % "ahk_id " xyHWnd
		Send {down}
        Send_WM_COPYDATA(xyHWnd, "::run lax(""D:\Program Files\QuickLook-3.7.1\QuickLook.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }
return

up::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
	    WinActivate, % "ahk_id " xyHWnd
	    Send {up}
        Send_WM_COPYDATA(xyHWnd, "::run lax(""D:\Program Files\QuickLook-3.7.1\QuickLook.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }
return


Send_WM_COPYDATA(xyHWnd, message) {
    size := StrLen(message)
    if !(A_IsUnicode) {
        VarSetCapacity(data, size * 2, 0)
        StrPut(message, &data, size, "UTF-16")
    } else {
        data := message
    }
    VarSetCapacity(COPYDATA, A_PtrSize * 3, 0)
    NumPut(4194305, COPYDATA, 0, "Ptr")
    NumPut(size * 2, COPYDATA, A_PtrSize, "UInt")
    NumPut(&data, COPYDATA, A_PtrSize * 2, "Ptr")
    result := DllCall("User32.dll\SendMessageW", "Ptr", xyHWnd, "UInt", 74, "Ptr", 0, "Ptr", &COPYDATA, "Ptr")
    return
}

Code: Select all

;MPC
#NoEnv
#NoTrayIcon
#Persistent
#SingleInstance force

xyPath := "D:\XYplorer"
xyExe  := "XYplorer.exe"
xyID   := "ahk_class ThunderRT6FormDC ahk_exe " xyExe

right::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
        Send_WM_COPYDATA(xyHWnd, "::sel '+1'; run lax(""D:\Program Files\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }
return

left::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
        Send_WM_COPYDATA(xyHWnd, "::sel '-1'; run lax(""D:\Program Files\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }

return

down::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
	    WinActivate, % "ahk_id " xyHWnd
		Send {down}
        Send_WM_COPYDATA(xyHWnd, "::run lax(""D:\Program Files\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }
return

up::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
	    WinActivate, % "ahk_id " xyHWnd
	    Send {up}
        Send_WM_COPYDATA(xyHWnd, "::run lax(""D:\Program Files\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe"" ""<curitem>"");")
    } else {
        Run, "%xyPath%\%xyExe%"
    }
return


Send_WM_COPYDATA(xyHWnd, message) {
    size := StrLen(message)
    if !(A_IsUnicode) {
        VarSetCapacity(data, size * 2, 0)
        StrPut(message, &data, size, "UTF-16")
    } else {
        data := message
    }
    VarSetCapacity(COPYDATA, A_PtrSize * 3, 0)
    NumPut(4194305, COPYDATA, 0, "Ptr")
    NumPut(size * 2, COPYDATA, A_PtrSize, "UInt")
    NumPut(&data, COPYDATA, A_PtrSize * 2, "Ptr")
    result := DllCall("User32.dll\SendMessageW", "Ptr", xyHWnd, "UInt", 74, "Ptr", 0, "Ptr", &COPYDATA, "Ptr")
    return
}
Win10, Win11 @100% 2560x1440 22H2

Post Reply