#NoEnv #NoTrayIcon #SingleInstance Force;~Send {Alt};~ 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") + * * ASC ("M") numput (dwdata, copydatastruct, 0) Cbdata: = Strputvar (Command, command, "C P0 ") Numput (cbdata, Copydatastruct, a_ptrsize); OS requires that this is done. Numput (&command, Copydatastruct, 2*a_ptrsize); Set lpdata to the string itself. SendMessage, 0x4a, 0, ©datastruct, 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 (This does not support the Unicode version of AHK)
Http://forum.ru-board.com/topic.cgi?forum=5&topic=45288&start=1030&limit=1&m=1 (Unicode supported)
Autohotkey calls the total Commander Internal command