So now we have a short program where we have a loop that returns the x position, y position and the button state of the mouse.
I've already given you plenty of information, if you dont know where to go from this, I don't really know why you're trying to do something this advanced.
chalcids
Posted: Wed May 30, 2012 8:15 pm Post subject: Re: The right and left click buttons
you said this tells me where the mouse is. I am don't care where the cursor is i want to click randomly and a . will appear when i left click and when i right click a - appears and doesn't need that advanced stuff would it?
Tony
Posted: Wed May 30, 2012 8:48 pm Post subject: RE:The right and left click buttons
right, but you still need to know if that click has occurred or not. That's what "b" in x,y,b is for.
Posted: Wed May 30, 2012 9:11 pm Post subject: Re: The right and left click buttons
chalcids @ Wed May 30, 2012 8:15 pm wrote:
you said this tells me where the mouse is. I am don't care where the cursor is i want to click randomly and a . will appear when i left click and when i right click a - appears and doesn't need that advanced stuff would it?
You don't have to worry about the variables x, y.
Mouse.Where(x,y,b)
The b is the above method is the button number as in. Right Click, Left Click, Scroll Wheel but the b returns an int value which represents these clicks. So first you have to get the value of b by using this method.
Then check if it's a right click or a left click, and you know how to do this because someone posted in this thread what each click's value is. I don't know the values but you just have to check if b = the click you want's value.
Really I don't think it can get easier then this...
chalcids
Posted: Thu May 31, 2012 7:30 am Post subject: Re: The right and left click buttons
okay thanks luffy now i actually understand and thanks to everyone else
chalcids
Posted: Thu May 31, 2012 7:39 am Post subject: Re: The right and left click buttons
wait one more issue when i run that code and test the keys the values for my right and left click are both 1 what do i then
jr5000pwp
Posted: Thu May 31, 2012 7:46 am Post subject: Re: The right and left click buttons
Somewhere near the top of your code include the line:
code:
Mouse.ButtonChoose ("multibutton")
This allows turing to distinguish between the 3 mouse clicks.