Need help PostMessage to SDL

Get help with using AutoHotkey and its commands and hotkeys
Posts: 5
Joined: 05 Sep 2019, 05:12

Need help PostMessage to SDL

08 Sep 2019, 16:58

So im trying to control SDL window with PostMessage.

on SDL docs i can see the event i need
https /SDL_TouchFingerEvent Broken Link for safety


how can i send this command in native ahk to my target window.
atm i control target window and sending mouse events after i calc true X true Y on target window for my postmassage.

Code: Select all

	WinGetPos, X, Y, Width, Height, %targetwindow% 
	X1 := X
	Y1 := Y
	W := Width
	H := Height
	X_end := (X1 + W) 
	Y_end :=  (Y1 + H)
	CoordMode, Pixel, Screen	
	ImageSearch, FoundX, FoundY, %X1%, %Y1%, %X_end%, %Y_end%, *75 img\Botit2.png 
	If ErrorLevel = 0
		TrueX := (FoundX) - (X - Y)
		TrueY := (FoundY)-(Y) 
		ControlClick2(TrueX, TrueY , targetwindow)
		Sleep, %SleepAmount%		

Code: Select all

ControlClick2(X, Y, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="")  
  hwnd:=ControlFromPoint(X, Y, WinTitle, WinText, cX, cY, ExcludeTitle, ExcludeText)  
  PostMessage, 0x200, 0, cX&0xFFFF | cY<<16,, ahk_id %hwnd% 
  PostMessage, 0x201, 1, cX&0xFFFF | cY<<16,, ahk_id %hwnd%  
  PostMessage, 0x202, 0, cX&0xFFFF | cY<<16,, ahk_id %hwnd% 
since my sdl already got the command how can it be posted from ahk to window target?
can i rawmsg?

Return to “Ask For Help”

Who is online

Users browsing this forum: mcl, Mindok, Xeo786 and 52 guests