Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Windows */
- #include <Windows.h>
- #include <TlHelp32.h>
- /* STL */
- #include <string>
- /* Sending commands to the console */
- void SendCopyData(HWND hWnd, std::string szCommand) {
- COPYDATASTRUCT m_cData;
- m_cData.cbData = szCommand.size() + 1;
- m_cData.dwData = 0;
- m_cData.lpData = (void*)szCommand.c_str();
- SendMessageA(hWnd, WM_COPYDATA, 0, (LPARAM)&m_cData);
- }
- /* Getting the window handle for convenience */
- HWND GetWindowHandle() {
- return FindWindowA(0, "Counter-Strike: Global Offensive - Direct3D 9");
- }
- void main() {
- SetConsoleTitleA("Commend for Commend");
- while (true) {
- SendCopyData(GetWindowHandle(), u8"say Commend for Commend ♡");
- Sleep(60000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement