I'm not trying to achieve anything, I'm not the topic author. I'm just telling you the source of the problem, which is only in x64.
If you are asking why it's necessary to show the full name of the current list item in the header, it's obviously to be aware of the cursor location in case you scroll the panel with the mouse wheel.
Code: Select all
;βββββββββββββββββββββββββββββββββββββββ
; Display current full name in TC header
; AHK 1.1
;βββββββββββββββββββββββββββββββββββββββ
#NoEnv
#KeyHistory, 0
ListLines, Off
SetBatchLines,-1
#SingleInstance force
#If WinActive("ahk_class TTOTAL_CMD")
WinGet, TCHwnd, ID, A
WinGetActiveTitle, Title
TCHeader := StrSplit(Title, " |")[1]
Loop {
WinSetTitle, ahk_id %TCHwnd%,, % TCHeader . " | " . TC_SendData("SP") . TC_SendData("SN")
Sleep, 40
}
#If
TC_SendData(Cmd, CmdType="", msg="", hwnd="") {
Critical ; Define "OnMessage" as STATIC it is registered at Script startup.
STATIC om:=OnMessage(0x4a, "TC_SendData"), TC_ReceiveDataValue:="", TC_DataReceived:="" ; 0x4a is WM_COPYDATA
IF ((msg=0x4A) AND (hwnd=A_ScriptHwnd)) ; EnSure is trigered by this Script.
EXIT (TC_ReceiveDataValue:=StrGet(NumGet(CmdType + A_PtrSize * 2)), TC_DataReceived:="1")
VarSetCapacity(CopyDataStruct, A_PtrSize * 3), TC_ReceiveDataValue:=1, TC_DataReceived:=""
CmdType=""
CmdType:=(A_IsUnicode ? "GW" : "GA"), TC_ReceiveDataValue:=""
If( A_IsUnicode ) {
VarSetCapacity(cmdA, StrPut(cmd, "cp0"))
Loop, % StrLen(cmd)
NumPut( Asc(SubStr(cmd, A_Index, 1)), cmdA, A_Index - 1, "Char")
}
NumPut(Asc(SubStr(CmdType,1,1)) + 256 * Asc(SubStr(CmdType,2,1)), CopyDataStruct, 0)
NumPut(StrLen(cmd), CopyDataStruct, A_PtrSize )
NumPut((A_IsUnicode ? &cmdA : &cmd), CopyDataStruct, A_PtrSize * 2)
SendMessage, 0x4A, %A_ScriptHwnd%, &CopyDataStruct,, A
While (TC_ReceiveDataValue="") {
IfEqual, TC_DataReceived, 1, Break
IfGreaterOrEqual, A_Index, 500, Break
Sleep,10
}
Return TC_ReceiveDataValue
}