Autohotkey & cm_copy parameters to set copy options

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Galizza
Member
Member
Posts: 167
Joined: 2018-09-07, 05:21 UTC

Autohotkey & cm_copy parameters to set copy options

Post by *Galizza »

 
Hi, i'm trying to assign parameters to cm_copy using Autohotkey
but it doesn't work, what am i doing wrong?. Thanks.


cm_copy overwriting all

PostMessage 1075, 905, /O2, , ahk_class TTOTAL_CMD


cm_copy verifying after copy

PostMessage 1075, 905, /V1, , ahk_class TTOTAL_CMD


Tc 11.00 Beta 2 32Bits / Windows 10 22H2 32Bits
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Autohotkey & cm_copy parameters to set copy options

Post by *Fla$her »

Code: Select all

#NoEnv
#NoTrayIcon
#KeyHistory, 0
ListLines, Off
SetBatchLines,-1

TC_SendData("cm_Copy /B1SO5HGV0")
ExitApp

TC_SendData(cmd) {
   VarSetCapacity(CopyDataStruct, A_PtrSize * 3)
   If( A_IsUnicode ) {
      VarSetCapacity( cmdA, StrPut(cmd, "cp0"))
      Loop, % StrLen(cmd)
         NumPut( Asc(SubStr(cmd, A_Index, 1)), cmdA, A_Index - 1, "Char")
   }
   NumPut(19781, CopyDataStruct, 0)
   NumPut(StrLen(cmd), CopyDataStruct, A_PtrSize)
   NumPut((A_IsUnicode ? &cmdA : &cmd), CopyDataStruct, A_PtrSize * 2)
   SendMessage, 0x4A, %A_ScriptHwnd%, &CopyDataStruct,, A
}
Overquoting is evil! 👎
Galizza
Member
Member
Posts: 167
Joined: 2018-09-07, 05:21 UTC

Re: Autohotkey & cm_copy parameters to set copy options

Post by *Galizza »

2Fla$her

I'll try your solution, thanks.
Post Reply