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

change windows api for mouse control #85

Merged
merged 2 commits into from
Sep 15, 2022
Merged

change windows api for mouse control #85

merged 2 commits into from
Sep 15, 2022

Conversation

Archer-Tatsu
Copy link
Contributor

No description provided.

win32api.PostMessage(self.hWnd,win32con.WM_LBUTTONDOWN,0,lParam)
win32api.PostMessage(self.hWnd,win32con.WM_LBUTTONUP,0,lParam)
win32api.SendMessage(self.hWnd,win32con.WM_LBUTTONDOWN,win32con.VK_LBUTTON,lParam)
win32api.SendMessage(self.hWnd,win32con.WM_LBUTTONUP,0,lParam)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意到我先前在这里没有指定VK_LBUTTON,请问是没有指定此参数导致的错误还是PostMessage本身导致的错误?
此外,为保持上下文一致,请使用MK_LBUTTON,这个的值和VK_LBUTTON一样都是0x01

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意到我先前在这里没有指定VK_LBUTTON,请问是没有指定此参数导致的错误还是PostMessage本身导致的错误? 此外,为保持上下文一致,请使用MK_LBUTTON,这个的值和VK_LBUTTON一样都是0x01

这个我可以再确认一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意到我先前在这里没有指定VK_LBUTTON,请问是没有指定此参数导致的错误还是PostMessage本身导致的错误? 此外,为保持上下文一致,请使用MK_LBUTTON,这个的值和VK_LBUTTON一样都是0x01

确认了一下,使用PostMessage配合正确的传参即可正常响应鼠标事件,已经改回PostMessage,并改为使用MK_LBUTTON

@hgjazhgj
Copy link
Owner

请问该pr已经确认在哪些模拟器上可用?哪些模拟器上不可用?
当然我还会进行进一步的测试,但是至少要等到25号之后了

@Archer-Tatsu
Copy link
Contributor Author

请问该pr已经确认在哪些模拟器上可用?哪些模拟器上不可用? 当然我还会进行进一步的测试,但是至少要等到25号之后了

目前是在夜神模拟器上测试可用,其他模拟器暂未测试。

@hgjazhgj
Copy link
Owner

如果不是PostMessage导致的问题,那就直接merge了
我也不知道为什么之前该写的参数没写

hgjazhgj added a commit that referenced this pull request Sep 15, 2022
@hgjazhgj hgjazhgj merged commit 0967d5a into hgjazhgj:master Sep 15, 2022
@hgjazhgj hgjazhgj added the bug Something isn't working label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants