jplumb Posted February 27, 2018 Share Posted February 27, 2018 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 More sharing options...
careca Posted February 27, 2018 Share Posted February 27, 2018 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 More sharing options...
jplumb Posted February 27, 2018 Author Share Posted February 27, 2018 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 More sharing options...
BigDaddyO Posted February 27, 2018 Share Posted February 27, 2018 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 More sharing options...
Zedna Posted February 27, 2018 Share Posted February 27, 2018 1) Try to call ControlFocus() before ControlClick() 2) look at my MouseClickFast() - you can have mouse fuly under your control using direct mouse API Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jplumb Posted February 28, 2018 Author Share Posted February 28, 2018 Amazing! Your MouseClickFast() works like a charm! ControlFocus() did nothing, just FYI. Link to comment Share on other sites More sharing options...
jplumb Posted February 28, 2018 Author Share Posted February 28, 2018 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. Link to comment Share on other sites More sharing options...
Zedna Posted February 28, 2018 Share Posted February 28, 2018 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) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jplumb Posted February 28, 2018 Author Share Posted February 28, 2018 Thanks! I'll toy with that some more later today. Link to comment Share on other sites More sharing options...
kornboy82 Posted May 12, 2018 Share Posted May 12, 2018 Have you sorted this out? I'm having the same kind of problem. Need to send about 250 clicks for this to work. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 12, 2018 Moderators Share Posted May 12, 2018 @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 More sharing options...
Bowmore Posted May 12, 2018 Share Posted May 12, 2018 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 More sharing options...
kornboy82 Posted May 12, 2018 Share Posted May 12, 2018 I know but I have the same behavior as jplumb had. Go read. memerim 1 Link to comment Share on other sites More sharing options...
kornboy82 Posted May 12, 2018 Share Posted May 12, 2018 It's mainly because the clicks do not register so sending 250 ones finally makes them work. It's not the best to do. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 12, 2018 Moderators Share Posted May 12, 2018 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 More sharing options...
xCROv Posted May 12, 2018 Share Posted May 12, 2018 bluestacks is an android emulator mainly used for games. Are you wanting to automate something in a game @kornboy82? Link to comment Share on other sites More sharing options...
seandisanti Posted May 12, 2018 Share Posted May 12, 2018 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 More sharing options...
Moderators JLogan3o13 Posted May 13, 2018 Moderators Share Posted May 13, 2018 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 More sharing options...
kornboy82 Posted May 14, 2018 Share Posted May 14, 2018 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 More sharing options...
Moderators JLogan3o13 Posted May 14, 2018 Moderators Share Posted May 14, 2018 None of which explains what you were trying to do. Glad you resolved it for yourself. "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 More sharing options...
Recommended Posts