Autohotkey can eliminate that problem. For example: with the below script, pressing "Tab" will load "Pane.xys" if (1) XYplorer window is active AND (2) focus is on List
Code: Select all
#SingleInstance force
#NoEnv
;#notrayicon ;uncomment this line if you don't want to see tray icon
Settitlematchmode, 2
SenderHWND := A_ScriptHwnd + 0 ;Return this script's hidden hwdn id. +0 to convert from Hex to Dec
MessagetoXYplorer := "::CopyData " SenderHWND ", get(""FocusedControl""), 2" ;resolved to sth like this: ::CopyData 7409230, get("FocusedControl"),2
#Ifwinactive XYplorer ahk_class ThunderRT6FormDC
Tab::
Global Datareceived
OnMessage(0x4a, "Function_Receive_WM_COPYDATA") ; 0x4a is WM_COPYDATA. This onhold and wait for the WM_Copydata from XYplorer then execute Function_Receive_WM_COPYDATA(wParam, lParam) below
FunctionMessagetoXYplorer(MessagetoXYplorer)
if(Datareceived = "L") ;get("FocusedControl") return "L" when focus is on List
FunctionMessagetoXYplorer("::load Pane")
Return
FunctionMessagetoXYplorer(MessagetoXYplorer) ;Send message to XYplorer
{
SetTitleMatchMode, 2
HWND := WinExist("XYplorer ahk_class ThunderRT6FormDC")
Size := StrLen(MessagetoXYplorer)
If !(A_IsUnicode)
{
VarSetCapacity(Data, Size * 2, 0)
StrPut(MessagetoXYplorer, &Data, Size, "UTF-16")
}
Else
Data := MessagetoXYplorer
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")
SendMessage, 0x4a, 0, ©DATA, , ahk_id %HWND%
}
Function_Receive_WM_COPYDATA(wParam, lParam)
{
StringAddress := NumGet(lParam + 2*A_PtrSize) ;lParam+8 is the address of CopyDataStruct's lpData member.
CopyOfData := StrGet(StringAddress) ;May also specify CP0 (default) or UTF-8 or UTF-16: StrGet(StringAddress, NumGet(lParam+A_PtrSize), "UTF-16")
cbData := NumGet(lParam+A_PtrSize)/2 ;cbData = String length
StringLeft, Datareceived, CopyOfData, cbData
}
P.S: Another way would be: Use AHK to remap "Tab" to "Ctrl+Shift+Alt+X" then use XY to assign "Ctrl+Shift+Alt+X" to do something:
Code: Select all
;#notrayicon ;Uncomment his line if you don't want tray icon
Settitlematchmode, 2
#Ifwinactive XYplorer ahk_class ThunderRT6FormDC
Tab::Sendinput ^+!x
XYplorer Beta Club