ronmage Posted October 17, 2018 Posted October 17, 2018 For the longest time I have been running into a problem where I can’t control click unless the window is active. It will work on some programs and not others. I don’t have a specific program in mind at the moment but here Is some example code. #RequireAdmin HotKeySet("{ESC}","_exit") HotKeySet("X","_Run") Global $x= 45 Global $y= 30 $Title = "Program Name" $hwnd = WinGetHandle($Title) While 1 Sleep (100) WEnd Func _Run() ControlClick($hwnd,"","","left",1,$x,$y) EndFunc Func _Exit() Exit EndFunc I know this is not very well written but it’s just an example. When the window is active it clicks as it should however it won’t in the background. My question is this, how can get a mouse click to a client without activating the window?
Billy Posted October 17, 2018 Posted October 17, 2018 Try ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] ) But as its description reads, "Some controls will resist clicking unless they are the active window."
ronmage Posted October 17, 2018 Author Posted October 17, 2018 Billy that is what I am using, note the _Run() Function. However as you pointed out the problem resisting the ControlClick more than anything that is what I am trying to find a way around
Moderators JLogan3o13 Posted October 17, 2018 Moderators Posted October 17, 2018 What is the application? How about a screenshot of the control you are attempting to click? Without anything more than "it doesn't work on some application" we cannot do much to help. "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!
ronmage Posted October 17, 2018 Author Posted October 17, 2018 example would be bluelstacks an android OS Emulator. But I don't have an app in mind at the moment more of a project to figure out a way around it.
ronmage Posted October 17, 2018 Author Posted October 17, 2018 To be clear not a game, but with the OS its self
kaisies Posted October 17, 2018 Posted October 17, 2018 You can't use control click with blue stacks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now