Click here to Skip to main content
13,094,411 members (56,544 online)
Rate this:
Please Sign up or sign in to vote.
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 19-Jun-12 3:22am
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.
Sergey Alexandrovich Kryukov 19-Jun-12 10:42am
And, for goodness sake, why doing all that?..
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..
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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:[^].

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.

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 19 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100