Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MouseClick being sent as per Spy++ but nothing is happening #6

Open
arthasdk opened this issue Oct 17, 2017 · 2 comments
Open

MouseClick being sent as per Spy++ but nothing is happening #6

arthasdk opened this issue Oct 17, 2017 · 2 comments

Comments

@arthasdk
Copy link

I have this game, Path of Exile, in which I am trying to automate the mouseclick, but MouseClicks are not working at all. I have tried sending it even when the application is in foreground and activated, still nothing.

I got the handle id using Spy++ and hard-coded it for testing purpose, I have tried multiple combinations of send / postmessage in AutoHotKey but to no avail. Only Autohotkey.Click Works, which activates the window, moves the mouse around and clicks in the position, just like physical mouse.

Messaging.BackgroundMouseClick(new IntPtr(0x80760), new Key(Messaging.VKeys.KEY_LBUTTON), 200,200,100);

Any help is very much appreciated. Thanks for making this library / tool.

PS: There is a paid bot in which this feature works, I have seen it, but whenever I have tried moving my physical mouse in the game window during it's operation my cursor is moved to 0,0 in the monitor, so I think the physical mouse needs to be far far away for it to work.

@EasyAsABC123
Copy link
Owner

Yeah the better method for this is to write a dll that intercepts the Mouse move event and the key press event. then add in an api for you to add to its stack. Then inject the dll into the game, not all games respond to Mouse or Key events some directly listen to DirectX events.

I recommend first working with AutoHotKey, test:
https://www.autohotkey.com/docs/commands/ControlSend.htm
https://www.autohotkey.com/docs/commands/ControlClick.htm

you might also have to try ControlSendRaw.

If ControlSend works, then it is utilizing SendMessage. Which this library has support for and might just need some hijacking to get to work for you.

This code is very old for me and written horribly [architecture], i don't currently have the time to re-implement this.

@EasyAsABC123
Copy link
Owner

feel free to submit a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants