Is it possible to open a new tab when I press WIN+E?

Features wanted...
Post Reply
Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Is it possible to open a new tab when I press WIN+E?

Post by Norn »

I have set XY as the default file manager,is it possible to open a new tab when I press WIN+E?
I searched a few pages and found nothing.
Attachments
Capture.PNG
Capture.PNG (50.49 KiB) Viewed 967 times
Win10, Win11 @100% 2560x1440 22H2

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

Re: Is it possible to open a new tab when I press WIN+E?

Post by highend »

One of my scripts helped you out? Please donate via Paypal

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

Re: Is it possible to open a new tab when I press WIN+E?

Post by Norn »

Thanks the reply,only found WIN+E open XY,and open file location redirecting to XY.
I want WIN+E to open XY then automatically open a new tab :? .
Win10, Win11 @100% 2560x1440 22H2

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

Re: Is it possible to open a new tab when I press WIN+E?

Post by highend »

You could have added a /script="::tab('new');" to the XY call...

A different way:

Code: Select all

#NoEnv
#NoTrayIcon
#Persistent
#SingleInstance force

xyPath := "C:\Program Files (x86)\XYplorer"
xyExe  := "XYplorer.exe"
xyID   := "ahk_class ThunderRT6FormDC ahk_exe " xyExe

#e::
    xyHWnd := WinExist(xyID)

    if (xyHWnd) {
        Send_WM_COPYDATA(xyHWnd, "::tab('new');")
        WinActivate, % "ahk_id " xyHWnd
    } 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
}
One of my scripts helped you out? Please donate via Paypal

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

Re: Is it possible to open a new tab when I press WIN+E?

Post by Norn »

Donated
Win10, Win11 @100% 2560x1440 22H2

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

Re: Is it possible to open a new tab when I press WIN+E?

Post by highend »

Thx!
One of my scripts helped you out? Please donate via Paypal

Post Reply