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 

Simulating Mouse movements

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





PostPosted: Thu Aug 21, 2008 10:07 pm    Post subject: Simulating Mouse movements Reply with quote

I'm trying to create a script that would allow me to move my mouse pointer with the arrow keys on my keyboard.

This is what I have so far, from what I can tell it should work but it dosn't. Crying or Very sad

Code:
;######################################################################################
;######################################################################################
;######################################################################################
;
;
; <COMPILER: v1.0.46.7>
Process, Priority, , High
;
Numlock::
  Suspend
  Var:=!Var ; Toggles between 0 and 1
  If Var
    {
      SoundBeep, 200, 500
    }
  Else
    SoundBeep,1000 , 500
Return
;
;######################################################################################
;######################################################################################
;######################################################################################
;

Down = 1

$*~Down::   
getkeystate, state, Down
if state = D
Loop
{
sleep, 15
DllCall("Mouse_Event", uint, 1, int, 0, int, Down , uint,0, int,0 )
sleep, 15
getkeystate, state, Down
if state = U
break
}
Return
;
;######################################################################################
;######################################################################################
;######################################################################################
;

Up = 1

$*~Up::   
getkeystate, state, Up
if state = D
Loop
{
sleep, 15
DllCall("Mouse_Event", uint, 1, int, 0, int, Up , uint,0, int,0 )
sleep, 15
getkeystate, state, Up
if state = U
break
}
Return
;
;######################################################################################
;######################################################################################
;######################################################################################
;

Left = 1

$*~Left::   
getkeystate, state, Left
if state = D
Loop
{
sleep, 15
DllCall("Mouse_Event", uint, 1, int, 0, int, Left , uint,0, int,0 )
sleep, 15
getkeystate, state, Left
if state = U
break
}
Return
;
;######################################################################################
;######################################################################################
;######################################################################################
;

Right = 1

$*~Right::   
getkeystate, state, Right
if state = D
Loop
{
sleep, 15
DllCall("Mouse_Event", uint, 1, int, 0, int, Right , uint,0, int,0 )
sleep, 15
getkeystate, state, Right
if state = U
break
}
Return
;
;######################################################################################
;######################################################################################
;######################################################################################
Back to top
Sivvy



Joined: 21 Jul 2008
Posts: 711
Location: Calgary, AB, Canada

PostPosted: Fri Aug 22, 2008 12:50 pm    Post subject: Reply with quote

Deguix's original script.

A script derived from Deguix's original.

Yet another script derived from Deguix's original.
Back to top
View user's profile Send private message MSN Messenger
Saturn.32
Guest





PostPosted: Fri Aug 22, 2008 4:19 pm    Post subject: Reply with quote

What...o.0 Confused

You just really confused me there.
Back to top
Saturn.32
Guest





PostPosted: Fri Aug 22, 2008 4:24 pm    Post subject: Reply with quote

So do I need to make one of those "keys" or what?
Back to top
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