Page 1 of 1
Is it possible to open a new tab when I press WIN+E?
Posted: 28 Nov 2021 08:15
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.
Re: Is it possible to open a new tab when I press WIN+E?
Posted: 28 Nov 2021 08:40
by highend
Re: Is it possible to open a new tab when I press WIN+E?
Posted: 28 Nov 2021 09:44
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

.
Re: Is it possible to open a new tab when I press WIN+E?
Posted: 28 Nov 2021 10:05
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", ©DATA, "Ptr")
return
}
Re: Is it possible to open a new tab when I press WIN+E?
Posted: 28 Nov 2021 20:03
by Norn
Donated
Re: Is it possible to open a new tab when I press WIN+E?
Posted: 28 Nov 2021 20:07
by highend
Thx!