Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Как узнать директории панелей? 
Author Message
mf-zl



PostPosted: Tue May 17, 2022 17:22    Post subject: Reply with quote

Немного кода на Autohotkey по данному вопросу
Code:

msgbox, % "Left: " TC_WM("LP") "`nRight: " TC_WM("RP")

/*
  Get info
  Supported commands A: Active side (returns L or R), or two byte command:
  1st byte: L=left, R=right, S=source, T=target.
  2nd byte: P=current path, C=list count, I=caret index, N=name of file under caret.

*/
TC_WM(cmd) {
  Global CopyOfData
  OnMessage(0x4a, "Receive_WM_COPYDATA")
  len := StrLen(cmd) + 1
  If A_IsUnicode
  { cmdStr := cmd
    VarSetCapacity(cmd, StrPut(cmd, "cp0"))
    Loop, % len
      NumPut(Asc(SubStr(cmdStr, A_Index, 1)), cmd, A_Index - 1, "Char")
  }
  VarSetCapacity(CopyDataStruct, A_PtrSize * 3)
  NumPut(Asc("G") + 256 * Asc(A_IsUnicode ? "W" : "A"), CopyDataStruct)
  NumPut(len, CopyDataStruct, A_PtrSize)
  NumPut(&cmd, CopyDataStruct, A_PtrSize * 2)
  SendMessage, 0x4A, % A_ScriptHwnd, &CopyDataStruct,, % "ahk_id " WinExist("ahk_class TTOTAL_CMD")
  Return, CopyOfData
}

Receive_WM_COPYDATA(wParam, lParam, msg, hwnd) {
  Global CopyOfData := StrGet(NumGet(lParam + 8))
}
View user's profile Send private message Visit poster's website


Powered by phpBB © 2001, 2005 phpBB Group