I've managed to SendMessage to Total Commander (TC) for different senarios.
viewtopic.php?f=83&t=124670&p=554090#p554090
But still I can not Get the return value from TC.
Below is the description cited from history.txt for TC.
And I've trid below script but not work.
Any help is appreciated. Thanks in advance.
viewtopic.php?f=83&t=124670&p=554090#p554090
But still I can not Get the return value from TC.
Below is the description cited from history.txt for TC.
CODE:
; 25.11.11 Added: Send WM_COPYDATA with dwData='G'+256*'A'
; and lpData pointing to command to get back WM_COPYDATA with various info.
; Supported commands A: Active side (returns L or R),
; or two byte command: first byte: L=left, R=right, S=source, T=target.
; Second byte: P=current path, C=list count, I=caret index, N=name of file under caret.
; dwData of return is 'R'+256*'A' (32/64)
And I've trid below script but not work.
Any help is appreciated. Thanks in advance.
CODE:
userCmd:="A"
AcSide:=TC_GetActive(userCmd)
MsgBox AcSide
TC_GetActive(userCommand)
{
; https://www.autohotkey.com/boards/viewtopic.php?p=538463&sid=4471e03917209854441ac07ebdc70901#p538463
static dwData := Ord("G") +256*Ord("A")
static WM_COPYDATA := 0x4A
cbData := Buffer(StrPut(userCommand, 'CP0'))
StrPut(userCommand, cbData, 'CP0')
COPYDATASTRUCT := Buffer(A_PtrSize * 3)
NumPut('Ptr', dwData, 'Ptr', cbData.size, 'Ptr', cbData.ptr, COPYDATASTRUCT)
MsgResult:=SendMessage( WM_COPYDATA,, COPYDATASTRUCT,, 'ahk_class TTOTAL_CMD')
return MsgResult
}
Statistics: Posted by valuex — Today, 10:02