AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mouse Click and Drag Help

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
electro5r
Guest





PostPosted: Thu Jun 26, 2008 6:31 pm    Post subject: Mouse Click and Drag Help Reply with quote

My mouse hasn't been working very well lately, I can't seem to find the problem, software or hardware. I think it may be software. Anyways, I found that if I use AHK to simulate a working click, it will fix the problem for the most part.

I can't seem to figure out, though, how to simulate mouse drags when I drag the mouse.

I have done the easy part:

LButton::Click
RButton::Click Right

I am probably missing something very easy, I just can't find it. Rolling Eyes
Thanks
Back to top
argneo



Joined: 14 Sep 2007
Posts: 136

PostPosted: Thu Jun 26, 2008 7:04 pm    Post subject: Reply with quote

MouseClickDrag

--------------------------------------------------------------------------------

Clicks and holds the specified mouse button, moves the mouse to the destination coordinates, then releases the button.

MouseClickDrag, WhichButton, X1, Y1, X2, Y2 [, Speed, R]

Example
Code:
MouseClickDrag, left, 0, 200, 600, 400

; The following example opens MS Paint and draws a little house:
Run, mspaint.exe
WinWaitActive, ahk_class MSPaintApp,, 2
if ErrorLevel
    return
MouseClickDrag, L, 150, 250, 150, 150
MouseClickDrag, L, 150, 150, 200, 100
MouseClickDrag, L, 200, 100, 250, 150
MouseClickDrag, L, 250, 150, 150, 150
MouseClickDrag, L, 150, 150, 250, 250
MouseClickDrag, L, 250, 250, 250, 150
MouseClickDrag, L, 250, 150, 150, 250
MouseClickDrag, L, 150, 250, 250, 250

_________________
WoW
Back to top
View user's profile Send private message
electro5r
Guest





PostPosted: Fri Jun 27, 2008 3:05 pm    Post subject: Reply with quote

Thanks for your help

Is there some way that will click up when I click up and click down when I click down?

Non-working example:

{LButton Down}::Click Down
{RButton Down}::Click Right Down
{LButton Up}::Click Up
{RButton Up}::Click Right Up

Thanks
Back to top
sinkfaze



Joined: 18 Mar 2008
Posts: 139

PostPosted: Sat Jun 28, 2008 1:07 pm    Post subject: Reply with quote

Are you unable to use WinMove to accomplish this? Not that that solves the other issues with your mouse, but I was just curious if you had tried it.
_________________
Have trouble searching the site for information? Try Quick Search for Autohotkey.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group