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

WIN - Interaction with desmume via windows messages #411

Closed
erwanvivien opened this issue Dec 30, 2020 · 1 comment
Closed

WIN - Interaction with desmume via windows messages #411

erwanvivien opened this issue Dec 30, 2020 · 1 comment

Comments

@erwanvivien
Copy link

I'm very noob to github, tell me if it's the place or not to send a message ?

Problem:

Using c# to send PostMessage WM_KEYUP/WM_KEYDOWN I want to be able to make a bot to play on my game from far away.

I'm using the following code to try send the message. However I believe that the current I have is not the actual one

PostMessage(current, WM_KEYDOWN, keycode, 0);
PostMessage(current, WM_KEYUP, keycode, 0);

I decided to loop through all subprocesses (I have only 1 and I believe is the WindowToolBar32 - One containing the rotate CWW button) and it still does not work.

Is there a process which I should send my keys to ?

Expected:

Being able to send keys to the main window and play the game.

Actual:

Only able to send to the WindowToolBar32 and not the actual game (trying on Pokemon, but should not alter if other game)

Thanks for any help given !

@erwanvivien erwanvivien changed the title Interaction with desmume via windows messages WIN - Interaction with desmume via windows messages Dec 30, 2020
@zeromus
Copy link
Contributor

zeromus commented Dec 30, 2020

  1. desmume doesn't handle keyboard input through WM_KEYUP and WM_KEYDOWN but rather directinput
  2. use autohotkey or xpadder or similar to synthesize directinput
  3. use lua, or use bizhawk+melonds

@zeromus zeromus closed this as completed Dec 30, 2020
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