Need help with a simple macro

Posts 1–2 of 2 · Page 1 of 1
Need help with a simple macro
Can anybody tell me how can i make left mouse button trigger another keyboard key, and while the left mouse button is pressed the key on the keyboard is kept pressed too. Any help is much apperciated
just a thought.. (not sure how the model is being used.. since I program Java and never tried mouse/keyboard clicks)
Code:
while(m.MousePressed()){                  //while button is down do
       k.keyPress(KeyEvent.VK_Q);        //press Q (for example)
       wait(200);}                              //delay 200ms (change it as you wish)

if(m.MouseClicked()){                        //if mouse was clicked (hold-release)
       k.keyPress(KeyEvent.VK_Q);}      //press Q
hope I helped!
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us