CS:GO Ahk script for sending messages to chat

Post gaming related scripts
a1987zz
Posts: 5
Joined: 16 Jan 2021, 16:05

CS:GO Ahk script for sending messages to chat

11 Feb 2022, 19:19

I want to share a script that for sending chat messages for cs: go game. The script is not a cheat.

Code: Select all

DetectHiddenWindows, On
Setbatchlines -1

ConsoleCommand := "say hi"

F1::
WinGet, hWnd, ID, ahk_class Valve001
VarSetCapacity(message, SizeInBytes := StrPut(ConsoleCommand, "UTF-8") * (A_IsUnicode ? 2 : 1), 0)
StrPut(ConsoleCommand, &message, "UTF-8")

VarSetCapacity(COPYDATASTRUCT, A_PtrSize*3, 0)

;NumPut(0, COPYDATASTRUCT, 0, "Uint")
NumPut(SizeInBytes, COPYDATASTRUCT, A_PtrSize, "UInt")
NumPut(&message, COPYDATASTRUCT, A_PtrSize*2, "Ptr")
  
DllCall("SendMessage", "Ptr", hWnd, UInt, WM_COPYDATA := 0x4A, "Ptr", 0, "Ptr", &COPYDATASTRUCT)
return
Moderator action: Moved to Scripts and Functions > Gaming from Ask For Help

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 8 guests