Pages: [1]   Go Down
Author Topic: Help w/ Mouse.click(); when using absolute mode  (Read 1018 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm starting a new thread, as the other thread seems to have died out.

I followed the steps here:  http://arduino.cc/forum/index.php/topic,94140.0.html

I am able to get the mouse cursor to move to a specific location on the screen, as expected.  I am unable to get the Mouse.click() command to click, though.  Has anyone else used this modified HID.cpp file successfully?
Logged

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 53
Posts: 1785
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Post your code or something that shows what you have attempted. Try using the click and also the press and release options. These options do the same thing, so you could be sending the wrong mouse button ID.

The modifications would only affect what Arduino files are included ( WProgram.h changed to Arduino.h ), not the actual operation of the class.

This will though:

Code:
void Mouse_::click(uint8_t b)
{
_buttons = b;
// move(0,0,0);
_buttons = 0;
// move(0,0,0);
}

The move sends the x,y, and current button, so that function effectively does nothing but set _buttons to '0'
Try replacing the x,y params of move to the last known position ( or where you want the click ).
Logged


Pages: [1]   Go Up
Jump to: