freeME Posted April 12, 2011 Report Share Posted April 12, 2011 I need to make a macro that left mouse double clicks on a certain pixel or coord when I press a keyboard button. Is this possible to make without the cursor being ontop of the pixel or coord? Quote Link to comment Share on other sites More sharing options...
acantor Posted April 12, 2011 Report Share Posted April 12, 2011 Maybe something like this? The mouse pointer moves to the target to double click it, but only for a fraction of second. // Capture mouse position (can specify relative to the window or screen) Get Mouse Position into (%N1%, %N2%) Relative to Screen // Move mouse to target, and double click Mouse Move: 100, 200 Relative to Screen Mouse Left Double Click //Restore original mouse position Mouse Move: %N1%, %N2% Relative to Screen Quote Link to comment Share on other sites More sharing options...
freeME Posted April 12, 2011 Author Report Share Posted April 12, 2011 Maybe something like this? The mouse pointer moves to the target to double click it, but only for a fraction of second. // Capture mouse position (can specify relative to the window or screen) Get Mouse Position into (%N1%, %N2%) Relative to Screen // Move mouse to target, and double click Mouse Move: 100, 200 Relative to Screen Mouse Left Double Click //Restore original mouse position Mouse Move: %N1%, %N2% Relative to Screen I need to have my cursor available at all times though Quote Link to comment Share on other sites More sharing options...
acantor Posted April 12, 2011 Report Share Posted April 12, 2011 I need to have my cursor available at all times though If the mouse pointer cannot be moved for even 5 or 10 milliseconds, you need another approach that does not involve the mouse. Is it possible to perform the task by keyboard? If yes, then your macro will send a sequence of keystrokes rather than mess with the mouse. Alternatively, you might be able to use ME to capture information about the control you want to double-click, and then activate the control programmatically. This is probably the most elegant and reliable solution, although implementing it would not be easy for a beginner. Quote Link to comment Share on other sites More sharing options...
freeME Posted April 13, 2011 Author Report Share Posted April 13, 2011 If the mouse pointer cannot be moved for even 5 or 10 milliseconds, you need another approach that does not involve the mouse. Is it possible to perform the task by keyboard? If yes, then your macro will send a sequence of keystrokes rather than mess with the mouse. Alternatively, you might be able to use ME to capture information about the control you want to double-click, and then activate the control programmatically. This is probably the most elegant and reliable solution, although implementing it would not be easy for a beginner. It is only possible to do the action with LDBLCLICK. Or 2x LCLICK of course. Quote Link to comment Share on other sites More sharing options...
acantor Posted April 13, 2011 Report Share Posted April 13, 2011 It is only possible to do the action with LDBLCLICK. Or 2x LCLICK of course. Maybe try the "PostMessage" command, which allows you to send a Windows message to any control. I've never used it. Maybe others have? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.