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

1.22 , 1.23, 1.24 does not seem to support API movewindow and postmessage mouseclick.how can fix . #3230

Open
xxdoc opened this issue Apr 29, 2022 · 15 comments

Comments

@xxdoc
Copy link

xxdoc commented Apr 29, 2022

The latest version does not seem to support movewindow and sendmessage mouseclick. The mouse button must be activated in the program interface, but version 1.21 can support it.

@rom1v
Copy link
Collaborator

rom1v commented Apr 29, 2022

Scrcpy does not do anything related to that, so it's probably SDL. Replace SDL2.dll from an old release.

@xxdoc
Copy link
Author

xxdoc commented Apr 30, 2022

I didn't change any code and phone. Just replaced all of them with 1.24。It works fine from 1.7 to 1.21. After I replaced it with 1.24. something is wrong. Replacement SDL2.dll with older version doesn't seem to start 1.24

@xxdoc
Copy link
Author

xxdoc commented Apr 30, 2022

Adb will take a long time between input and mouse clicks quickly. scrcpy mouse click interval is very short. That's why I use scrcpy.It would be perfect to fix the sendmessage send key. Because it can transmit mouse clicks to the phone even when the phone image is minimized

@rom1v
Copy link
Collaborator

rom1v commented Apr 30, 2022

Could you retry an older version now?

@xxdoc
Copy link
Author

xxdoc commented Apr 30, 2022

Could you retry an older version now?

yes。I developed based on 1.71. Later, I saw that 1.21 was updated. Yesterday, I saw that it was updated to 1.24 and replaced it. Other versions have no problem in the same situation.Of course I will keep working under 1.21

    phoneHwnd= FindWindow("SDL_app", “")

    SetParent phoneHwnd, PhoneView.hWnd '
     
    MoveWindow phoneHwnd, 0, 0, 720, 960, True ' phoneHwnd is scrcpy load  phone screen image

     then
     PostMessageW phoneHwnd, WM_LBUTTONDOWN, MK_LBUTTON,  Coordinates
 
     PostMessageW phoneHwnd, WM_LBUTTONUP, 0&, Coordinates

@rom1v
Copy link
Collaborator

rom1v commented Apr 30, 2022

Could you try v1.22 and 1.23 to find from which version it fails?

@xxdoc
Copy link
Author

xxdoc commented Apr 30, 2022

ok ,i will download1.22 and1.23 to test

@rom1v
Copy link
Collaborator

rom1v commented Apr 30, 2022

All releases are available here: https://github.com/Genymobile/scrcpy/releases

@xxdoc
Copy link
Author

xxdoc commented May 1, 2022

All releases are available here: https://github.com/Genymobile/scrcpy/releases

Sorry for my late reply. I tested 1.22 and 1.23 are not able to achieve

@xxdoc xxdoc changed the title 1.24 does not seem to support movewindow and sendmessage mouseclick 1.22 : 1.23:1.24 does not seem to support movewindow and postmessage mouseclick.how can fix . May 4, 2022
@xxdoc xxdoc changed the title 1.22 : 1.23:1.24 does not seem to support movewindow and postmessage mouseclick.how can fix . 1.22 , 1.23, 1.24 does not seem to support movewindow and postmessage mouseclick.how can fix . May 4, 2022
@xxdoc xxdoc changed the title 1.22 , 1.23, 1.24 does not seem to support movewindow and postmessage mouseclick.how can fix . 1.22 , 1.23, 1.24 does not seem to support API movewindow and postmessage mouseclick.how can fix . May 4, 2022
@xxdoc
Copy link
Author

xxdoc commented May 4, 2022

can it be repaired

@rom1v
Copy link
Collaborator

rom1v commented May 4, 2022

If you retest now with 1.21 and it works with 1.21, try to copy SDL2.dll from 1.21 to 1.22/1.23/1.24 release directory.

I don't know what else could be the problem.

In v1.22 changelog:

Upgrade SDL to 2.0.20 in Windows releases

@xxdoc
Copy link
Author

xxdoc commented May 5, 2022

If you retest now with 1.21 and it works with 1.21, try to copy SDL2.dll from 1.21 to 1.22/1.23/1.24 release directory.

I don't know what else could be the problem.

In v1.22 changelog:

Upgrade SDL to 2.0.20 in Windows releases

thanks 。i replaceed sdl2.dll to1.24 。now work ok 。Will the replacement of SDL affect the functionality of scrcpy?

@HuangGH
Copy link

HuangGH commented Jun 18, 2022

hi @xxdoc movewindow and sendmessage mouseclick, i also need this feature, Can you share how you did it, thank you very much

@xxdoc
Copy link
Author

xxdoc commented Jun 19, 2022 via email

@chldbwnstm
Copy link

I don't know what you need to do. What you're talking about is common API operations. Just send the message to the handle. Of course, there will be problems in the background of the mouse. It should be because I found that scrcpy will detect the position of the foreground mouse during the test. Always subject to the current mouse position. This estimate needs to be solved officially.

Hi xxdoc, I know it's been a while but can you please help me a bit with this issue, I will make sure I don't take
much of your time, just got few questions.
my email is [email protected] it would be greatful if you could just send me a message I will reply asap.

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

4 participants