Jump to content

I have to ControlClick 100-200x to click into BlueStacks


jplumb
 Share

Recommended Posts

Like the topic says, when using ControlClick to click into BlueStacks3,

if I just do:

ControlClick("BlueStacks","","","left",1,$pos[0],$pos[1])

It doesn't do anything, no matter how many times I loop it. But if I do a super high number, like:

ControlClick("BlueStacks","","","left",401,$pos[0],$pos[1])

Then it usually works, but still requires more than one attempt on occasion, and even less common it sometimes will click multiple times.

Does anyone know why this happens? I'm wondering if it's because BlueStacks emulates a phone (or tablet), and touch screen software for mobile devices possibly doesn't register tiny nicks on the screen, so that your phone doesn't wake up whenever the smallest particle touches the screen? Or maybe I have no idea what's really going on behind the scenes haha.

Thanks.

Link to comment
Share on other sites

I guess that is one possibility, another would be that the coordinates are wrong.

How are you setting $pos?

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

I got the coords from AutoIt v3 Window Info, under the Control tab, ControlClick Coords. I know the coords are correct because it clicks in the correct place -- it just requires a ton of clicks.

Is there a way to maybe send a MouseDown event through ControlClick (or something similar), then maybe a quarter second later send a MouseUp event?

Link to comment
Share on other sites

Just throwing something out there, have you tried MouseClick("left", $pos[0], $pos[1], 1, 20) to see if that works?

Not sure about this Emulator, but on others I've used, that single control is the entire screen and sending ControlClicks to it acts weird but the normal MouseClick seems to be more reliable in that case.

Link to comment
Share on other sites

8 hours ago, jplumb said:

Is there a way to just send a MouseDown and MouseUp event using DllCalls directly to BlueStacks, that you know of, so that I can retain control of my mouse? I could probably research more about DllCall's functionality.

Yes, according to AutoIt's 3.1.0 sources where you can see what API uses AutoIt inside ControlClick(), shortly pseudocode:

- AttachThreadInput(target_wnd, true)
- SetActiveWindow(target_wnd)
- PostMessage(target_ctrl, WM_LBUTTONDOWN)
- PostMessage(target_ctrl, WM_LBUTTONUP)
- AttachThreadInput(target_wnd, false)

 

Link to comment
Share on other sites

  • 2 months later...
  • Moderators

@kornboy82 what do you need to send 250 clicks for? There has got to be a better way to accomplish this

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

With ControlClick() the coords specify the position to click relative to the top left of the control,  

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Link to comment
Share on other sites

  • Moderators

That still doesn't explain why you need to send 250 clicks rapidly, how about a better explanation and help us help you.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Kornboy, re-read the original thread, the responses were enough for the OP to solve their issue. 

 

On 2/27/2018 at 5:25 PM, jplumb said:

Amazing! Your MouseClickFast() works like a charm!

ControlFocus() did nothing, just FYI.

Everyone else, it's not that they actually need to send that many, they are trying to send a single click, but because bluestacks is difficult to work with, they're sending hundreds to get it to recognize one.

If at first you don't succeed... try it 200 more times the same exact way, right?

Link to comment
Share on other sites

  • Moderators

More importantly, to all - as has been stated numerous times but never seems to sink in - when a Moderator steps into a thread to determine legitimacy, please stay out until it is deemed ok to proceed.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Well I'm automating a software to deploy on over 8000 computers at my work. Student will be clicking on an AutoIt exe that will click elsewhere with administrative rights but never mind, I found why it was causing my problem. Have a nice day.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...