Rustywinger Posted December 14, 2007 Report Share Posted December 14, 2007 So I capture control to C7. Mouse Click on Control is then entered into the Macro script, with C7 as the control specified to reference. Single click... works as advertised. A click is entered into the control. Double click... does not. It will not even click on the control. Sorry if this has been previously covered. Ideas? I have tried using different mouse speeds, etc. Quote Link to comment Share on other sites More sharing options...
floyd Posted December 18, 2007 Report Share Posted December 18, 2007 Double click... does not. It will not even click on the control. Sorry if this has been previously covered. Ideas? I have tried using different mouse speeds, etc. Not sure what is happening. I set up a test with the calculator and got the same results as you. I'll create a bug report and send it to Insight. In the mean time, two single-clicks in a row can be used as a work-around. Quote Link to comment Share on other sites More sharing options...
kevin Posted December 18, 2007 Report Share Posted December 18, 2007 The capabilities of a specific Window Control depend upon that component and how the application was written. Windows uses 'messages' to accomplish certain tasks such as sending keystrokes or mouse clicks to an application. A Window Control needs to be written to handle these messages. If it is to accept keystrokes, it needs to have a keystroke handler. If it is to accept mouse clicks or mouse double-clicks it needs to have handlers that accept clicks and double-clicks. An application may have a component (like an edit box) that accepts a double-click but does not accept a double-click via a Window Control. Macro Express correctly sends the messages for keystrokes, clicks and double-clicks to controls. I reverified that these are working this morning. Floyd said: I set up a test with the calculator and got the same results as you. I looked at Calculator and there are no functions that use the double click. Double mouse clicks are treated as two individual single clicks. In this case Windows and/or Calculator may be interpreting double-clicks as single clicks. But, it does not accept a Double Click message. A better test is with WordPad. If you double-click on a word in WordPad the word gets highlighted. A simple macro verifies that double-click via a Window Control is working correctly: // Launch WordPad Activate or Launch: "wordpad" OR "wordpad.exe" Wait For Window Title: "wordpad" // Type some text into WordPad Text Type: The quick brown fox jumps over the lazy dog.<ENTER> // Get control and double click via control to highlight a word Get Control %C1% (Document - WordPad: RICHEDIT50W) Mouse Double Left Click on Control %C1% <REM2:Launch WordPad><LAUNCHYES3:0:0112wordpad<LAUNCH:wordpad.exe><WAITWIN2:000000:000010:wordpad><REM2:><REM2:Type some text into WordPad><TEXTTYPE:The quick brown fox jumps over the lazy dog.<ENTER>><REM2:><REM2:Get control and double click via control to highlight a word><GETCONTROL2:01:WORDPAD.EXE:WordPadClassDocument - WordPad001:15RICHEDIT50W><CCLICK:F:01:0:F:000150,000000> Quote Link to comment Share on other sites More sharing options...
Rustywinger Posted December 21, 2007 Author Report Share Posted December 21, 2007 A better test is with WordPad. If you double-click on a word in WordPad the word gets highlighted. A simple macro verifies that double-click via a Window Control is working correctly: Thanks for the insight, both of you. Sorry I was so late in responding. Ok, I am entering a double click into a text field that contains text. If I just double-click on it manually, the text- if it exists- is highlighted (This is what I want to happen). If I use ME to click on control, the text prompt is inserted into the text field at either the point of click or beginning of line (if it was blank) If I use ME to double click on control... nothing. Not even the text prompt. If a "double click on control" is simply two clicks in sucession, why isn't the first one at least inserting the prompt? BTW- this is all just "discussion" now... I had to use "move mouse" and "left button double click", which does the job- I was just wondering why double-click on control couldn't do this since now my script is no longer dynamic! How awful. ;-) Quote Link to comment Share on other sites More sharing options...
kevin Posted December 21, 2007 Report Share Posted December 21, 2007 (edited) If I use ME to double click on control... nothing. Not even the text prompt. If a "double click on control" is simply two clicks in sucession, why isn't the first one at least inserting the prompt? A double-click is not just two single clicks. When you click twice, windows interprets that as a double-click and sends a double click message to the application. When you click once, windows sends a single click message to the application. These messages are different. I was just wondering why double-click on control couldn't do this It sounds like your application does not support double-clicks via the Window Control. The capabilities of a specific Window Control depend upon that component and how the application was written. Windows uses 'messages' to accomplish certain tasks such as sending keystrokes or mouse clicks to an application. A Window Control needs to be written to handle these messages. If it is to accept keystrokes, it needs to have a keystroke handler. If it is to accept mouse clicks or mouse double-clicks it needs to have handlers that accept clicks and double-clicks. An application may have a component (like an edit box) that accepts a double-click but does not accept a double-click via a Window Control. Edited December 21, 2007 by kevin Quote Link to comment Share on other sites More sharing options...
Rustywinger Posted December 21, 2007 Author Report Share Posted December 21, 2007 A double-click is not just two single clicks. When you click twice, windows interprets that as a double-click and sends a double click message to the application. When you click once, windows sends a single click message to the application. These messages are different.It sounds like your application does not support double-clicks via the Window Control. Ugh. I am still confused, sorry! I just want to understand these things so I can consider them in the future. How is an ME "Double click on control" different than an ME "Mouse left button Double Click"? I would have just assumed that ME delivered on both action requests the same way since the "on control" part of that is just a means of focusing the click on X-Y, same as "move mouse". Obviously it doesn't work that way because one works and one doesn't. Is it because the "Mouse Left Button Double Click" sends the command through a different process, ie- through the the mouse handling routines and "Double Click on Control" bypasses that and sends the command directly to the system? Quote Link to comment Share on other sites More sharing options...
kevin Posted December 21, 2007 Report Share Posted December 21, 2007 The Mouse Left Button Double Click command sends a message to Windows that says the user double-clicked. Windows sends the message to the application. The Mouse Double Left Click on Control %C1% command sends a message directly to the component (edit box, button, etc.) in the application. Just as an application may have a component without an associated Window Control, applications may have routines that process double-click messages sent to the application (not the component) without having a routine to process double-click messages send to the component (via a Window Control). Quote Link to comment Share on other sites More sharing options...
ThatJimGuy Posted December 26, 2007 Report Share Posted December 26, 2007 Ugh. I am still confused, sorry! I just want to understand these things so I can consider them in the future.How is an ME "Double click on control" different than an ME "Mouse left button Double Click"? I would have just assumed that ME delivered on both action requests the same way since the "on control" part of that is just a means of focusing the click on X-Y, same as "move mouse". Obviously it doesn't work that way because one works and one doesn't. Is it because the "Mouse Left Button Double Click" sends the command through a different process, ie- through the the mouse handling routines and "Double Click on Control" bypasses that and sends the command directly to the system? I NEVER use double-click because it's not reliable. Instead, for each click, try using: Mouse Left Button Down Mouse Left Button Up So, in your case, for a double left mouse click do this: Set Focus to %C7% Mouse Left Button Down Mouse Left Button Up Mouse Left Button Down Mouse Left Button Up If this doesn't work (I haven't tested it), let me know and I'll figure it out for you. -jim 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.