Jump to content
Macro Express Forums

wait for mouse double click, is it possible?


Recommended Posts

None directly that I am aware of.

You might be able to wait for a mouse click, record the time, then wait again for another click. If the period is less than 500 ms or so, you know a double click has occurred. 

You could also halt the macro and enable another macro with activation of a System Event for double-click and restart the macro jumping to that point in the macro. Or breaking the macro in two, one before and one after. 

You could also use control events. Often when one double clicks on something a control will come into existence or change. For instance "Wait for control" or "Wait for control to be focused." 

What is the application? It's hard to help much without knowing what program you're using and what you're trying to do. 

Link to comment
Share on other sites

Maybe something like this? I opted for hotkey activation, and chose LMouse as the hotkey.

 

Lock Keyboard and Mouse
Wait for Left Mouse Click // One click
On Error
  Catch Error: Condition was not met within the specified amount of time
    Text Box Display: One click
    Macro Stop
  End Catch Error
End Error
 
Text Box Display: Two clicks
Unlock Keyboard and Mouse

 

A script like this needs to be window or program specific. Otherwise, left clicking anywhere, and in any context, will trigger the macro. Which you probably don't want to happen!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...