首页 > 代码库 > Autohotkey 调用 Total Commander内部命令
Autohotkey 调用 Total Commander内部命令
#NoEnv #NoTrayIcon #SingleInstance force ;~ Send {Alt Down} ;~ Sleep, 20 #IfWinActive ahk_class TTOTAL_CMD#0::SendTCUserCommand("em_To7zip") return;~ WinWait, ahk_class AutoIt v3 GUI ;~ Send {Alt Up} SendTCUserCommand(Command) ; string { If Command <> { VarSetCapacity(CopyDataStruct, 3*A_PtrSize, 0) ; Set up the structure‘s memory area. dwData := Asc("E") + 256 * Asc("M") NumPut(dwData, CopyDataStruct, 0) cbData := StrPutVar(Command, Command, "cp0") NumPut(cbData, CopyDataStruct, A_PtrSize) ; OS requires that this be done. NumPut(&Command, CopyDataStruct, 2*A_PtrSize) ; Set lpData to point to the string itself. SendMessage, 0x4a, 0, &CopyDataStruct,, ahk_class TTOTAL_CMD ; 0x4a is WM_COPYDATA. Must use Send not Post. } } StrPutVar(string, ByRef var, encoding) { ; Ensure capacity. VarSetCapacity( var, StrPut(string, encoding) * ((encoding="utf-16"||encoding="cp1200") ? 2 : 1) ) ; Copy or convert the string. return StrPut(string, &var, encoding) }
FROM:http://ahk8.com/thread-3677.html (这个不支持Unicode版的AHK)
http://forum.ru-board.com/topic.cgi?forum=5&topic=45288&start=1030&limit=1&m=1 (支持Unicode)
Autohotkey 调用 Total Commander内部命令
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。