ControlSend not working.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
chusski
Posts: 31
Joined: 28 Jan 2018, 03:12

ControlSend not working.

06 Jun 2019, 13:34

Hello guys.

know why that code not work?

Code: Select all

ControlClick, ahk_parent, DragonBallOnline2 ahk_class DragonBall,, Left, 1,  x89 y341 NA
thx very much .
gregster
Posts: 9114
Joined: 30 Sep 2013, 06:48

Re: ControlSend not working.

06 Jun 2019, 14:02

Not sure, but I don't see ahk_parent as an option in the ControlClick docs, only for ControlSend.
Apart from that, games can be tricky and are not guaranteed to react at all to these commands (not that they always work with regular programs ;) ), afaik.
User avatar
Hellbent
Posts: 2114
Joined: 23 Sep 2017, 13:34

Re: ControlSend not working.

06 Jun 2019, 14:11

gregster wrote:
06 Jun 2019, 14:02
Apart from that, games are tricky and not guaranteed to react at all to these commands, afaik.
I have come across at least 4 different behaviors when using ControlClick.
Sometimes everything works perfectly, other times it only works if the window isn't active, other times it only sends clicks to where your cursor is but if you then hide the window it will continue to click where your cursor was. Very much a Hit or Miss command.
chusski
Posts: 31
Joined: 28 Jan 2018, 03:12

Re: ControlSend not working.

06 Jun 2019, 14:33

somethimes work perfecly.... yes...

then what optopns i get to send clicks of mouse ?

I read this in other post: https://autohotkey.com/board/topic/96952-possible-controlclick-improve/

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% ; WM_MOUSEMOVE
  PostMessage, 0x201, 0, cX&0xFFFF | cY<<16,, ahk_id %hwnd% ; WM_LBUTTONDOWN  
  PostMessage, 0x202, 0, cX&0xFFFF | cY<<16,, ahk_id %hwnd% ; WM_LBUTTONUP  
}
How can i convert it, for work like my code ?

Code: Select all

ControlClick, ahk_parent, DragonBallOnline2 ahk_class DragonBall,, Left, 1,  x89 y341 NA
thx for reaplis

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk, Rauvagol and 346 guests