If either of those suggestions do not work.ĮDIT: forgot to mention the topic name its relevant and not something like ** How can i get this to work **. I will ask you to post the whole script though. You can already see how much posting examples of the script is. Try leaving the CoordMode, Mouse, Screen out so they will both be getting the positions the same way.( I also doubt this because you have given the information of its working at the current mouse position ). So the mouse position is getting the coordinates relative to the screen but the control click is not sending them relative to the screen. ControlClick does not use the CoordMode, ,Screen. If the ControlClick is not working but the MsgBox is saying the right coordinates there can be only one thing i can think of. ( Im just making sure / eliminating possibilities ). Although you have mentioned it is working ( just not in the spot ), so i doubt that is your actual code.
If this is a direct copy / paste from your code you will find that the window "WinTitle" is more than likely not going to exist. ** Applause **ĭoing this helps us help you a lot quicker and faster.įirst i wish to point out that in the ControlClick command you have for the window title parameter you have WinTitle. You have put together a detailed question with examples of code and more than one way you have tried. Where the variables tell me they clicked at the correct position even though it has not.ĬontrolClick, WinTitle,NA x%xpos% y%ypos%Īnd it still only clicks at the current mouse position and not the saved position Msgbox, The cursor is at X%xpos% Y%ypos%.
Ive read the FAQ and help files, thats how I knew how to use these functions and that they existed in the first place.
I tried hardcoding the mouse position such asĪnd it does not work at all, it doesnt even click where the mouse currently is, Ive used the Windows Spy to make sure the coords and the title and all that is correct but maybe I just dont understand the coding enough to know exactly how to do it. It clicks on the control window perfectly when I have another window on top of it but not at the position I want. The problem I am having is that after I save the mouse position by pressing the Division key the next hotkey to press the mouse button at the saved position doesnt click at the saved position, it clicks at the current mouse position no matter what. Set up so the coords are all the same based on my desktop Where WinTitle (example) is the control window. To get the mouse position in variables %xpos% and %ypos% to send to another hotkeyĬontrolClick, x%xpos% y%ypos%, WinTitle,Pos Im trying to get a mouse click to work in a minimized window or in a window that is currently not the active window.