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

control_click and control_send in Bluestacks #32

Open
AnthonyZJiang opened this issue May 19, 2020 · 7 comments
Open

control_click and control_send in Bluestacks #32

AnthonyZJiang opened this issue May 19, 2020 · 7 comments

Comments

@AnthonyZJiang
Copy link

AnthonyZJiang commented May 19, 2020

Has anyone had any issue with control_click and control_send in Bluestacks?

The following AU3 code works fine:

ControlFocus("BlueStacks", "", "" )
ControlClick("BlueStacks", "", "", "left", 1, 645, 626)
ControlSend("BlueStacks", "", "", "123")

But the python translation of the above code doesn't work:

import autoit

autoit.control_focus("BlueStacks", "") #this works
autoit.control_click("BlueStacks", "", x=615, y=654) #doesn't work, no error message, just doesn't click
autoit.control_send("BlueStacks", "", "123") #doesn't work, no error message, just text doesn't get sent

Also, other control functions such as control_hide and control_show work well.

@AnthonyZJiang AnthonyZJiang changed the title control_click and control_send to Bluestacks control_click and control_send in Bluestacks May 19, 2020
@AnthonyZJiang
Copy link
Author

AnthonyZJiang commented May 20, 2020

I figured it has to be an issue with the included AutoItX3.dll, so I replaced them with the ones found in my AutoIt folder. Now control_click and control_send works well. I haven't done any conclusive test of the dll but all my old scripts still work. They use mouse_click and send.

Maybe it worth to test them fully.
lib.zip

@DoTheBestMayB
Copy link

DoTheBestMayB commented Jul 29, 2020

I have same issue(only focus works)

  1. Replacing dll file with what you upload is not help.
  2. I install autoit, and replace dll file with dll included in autoit. But not help.

Is there any suggestion for solving this problem?

@DoTheBestMayB
Copy link

DoTheBestMayB commented Jul 29, 2020

Below code works.

autoit.control_focus("BlueStacks", "")
autoit.control_send("BlueStacks", "", send_text="1")

But below code not works

# autoit.control_focus("BlueStacks", "")
autoit.control_send("BlueStacks", "", send_text="1")

@AnthonyZJiang
Copy link
Author

For Bluestacks, you have to control focus first. This is an issue with Bluestacks.

@gruberdev
Copy link

gruberdev commented Aug 3, 2020

I figured it has to be an issue with the included AutoItX3.dll, so I replaced them with the ones found in my AutoIt folder. Now control_click and control_send works well. I haven't done any conclusive test of the dll but all my old scripts still work. They use mouse_click and send.

Maybe it worth to test them fully.
lib.zip

Can you make a branch with these files? I'd be highly valuable for other Bluestacks users as well.

Edit: I can confirm this patch works. Use as its own discretion.

@AnthonyZJiang
Copy link
Author

I figured it has to be an issue with the included AutoItX3.dll, so I replaced them with the ones found in my AutoIt folder. Now control_click and control_send works well. I haven't done any conclusive test of the dll but all my old scripts still work. They use mouse_click and send.
Maybe it worth to test them fully.
lib.zip

Can you make a branch with these files? I'd be highly valuable for other Bluestacks users as well.

Edit: I can confirm this patch works. Use as its own discretion.

The latest dll is version 3.3.14.5.

The list of changes in these API can be found here:
Release notes
Script breaking changes

I might be able to spend some time on getting the dll updated in a few days/weeks.

@daizichuan
Copy link

daizichuan commented Nov 23, 2023

I don't know what is Bluestacks.Maybe i have same question. when i use Windows cmd,if i run py script as administrator
以管理员运行,it works!wish this could help u!
by the way, pycharm run as administrator, it works too

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