kornholeking Posted June 21, 2022 Share Posted June 21, 2022 Hello, I hope this is a severe oversight on my part as I feel that I understand how to use the ControlClick function fairly decently, but for some reason when I am attempting to use the following lines the second ControlClick command below does not open the context menu within the application that I am attempting to right click within: WinActivate("Default") WinWaitActive("Default") ControlClick("Default", "", 1005, "primary", 1, 150, 10) ControlClick("Default", "", 1005, "secondary", 1, 150, 10) I am able to manually right click on the location in question within the application to bring up the context menu. I threw in the first ControlClick above to ensure that the function is finding the correct control ID and location by single (left) clicking which highlights an object within the application, so I can confirm that that first ControlClick is working. For grins, I opened up a blank Notepad to test the same lines above and was able to pull up the context menu. I also tried swapping my mouse buttons to see if that would make any impact and then I was able to primary (right) click but still unable to secondary (left) click to bring up the context menu within my application. As a workaround, I am using the MouseClick function which seems to work fine. However, I've noticed that the window of the application in question tends to move around upon launch (sometimes even offscreen) and the MouseClick function has gotten caught up when reaching the edge of the screen. WinActivate("Default") WinWaitActive("Default") Opt("MouseCoordMode", 2) MouseClick($MOUSE_CLICK_SECONDARY, 150, 45) All signs point to my application being the culprit here for some reason, but I was wondering if anyone else has come across this sort of a scenario or what other options might be available as I'd prefer to use the ControlClick function since MouseClick seems to run into the challenges I mentioned above. Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now