Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone..

I need bit guidence from u people. Am having third party application that contains BUY & SELL buttons. Given certain conditions If condition is meet, I need to left click on both BUY & SELL buttons simultaneously at the same time, same movement. Till now i did, to move the mouse cursor towards the BUY button & perform left click. But at the same time i need to click on SELL button also.
Is there any way to create another mouse pointer(Virtual mouse pointer), so that one mouse pointer can click on BUY button & other on SELL button at the same time. On other hand, First click on BUY button & after some time then click on SELL button is not accepted because requirement doesn't meet up. Please suggest me some ideas..

Thank you..
Posted
Updated 29-Nov-19 1:45am
Comments
Sergey Alexandrovich Kryukov 19-Jun-12 10:41am    
Just a note: nothing is clicked at the same time, ever. If you mean pressing one key, and pressing another one while holding the first one down, this is completely different thing. The primary raw keyboard events are key down and key up, there is no "click", and none of the events are at the same time, even if you use two keyboards.
--SA
Sergey Alexandrovich Kryukov 19-Jun-12 10:42am    
And, for goodness sake, why doing all that?..
--SA
Guru_C++ 20-Jun-12 1:08am    
Bascically am working on Project Trading application, if BUY price is less than or equalls to SELL price. I need to open the both confirmation windows by clicking both BUY & SELL buttons at the same time. Suppose, first if i click SELL button & then if i click BUY button during that time the price will be moved up.. So i tried to click at the same time. I was not sure it is possible or not. So i asked..

Please see my comments to the question.

I don't think you can have yet another mouse pointer, if I understand you correctly. You can simulate input events on low level using the function SendInput:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[^].

This method allows you to simulate input on low level, pretty much as if it comes from a keyboard or a pointing device (mouse) driver.

—SA
 
Share this answer
 
Even if you could do it, the event will not be simultaneous.

You could try to Post/Send Messages to the application instead of simulating the button press.

I'm curious why do you need to "press" both buttons at the same time.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 19-Jun-12 10:46am    
It depends. I must say, the OP's idea is not clear at all, but the clear simulation is done using SendInput, and Send/Post message may not work. Please see my answer.
--SA
Maximilien 19-Jun-12 10:53am    
Yep, I meant to write SendInput (it's not an API I use often,or at all).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900