Jump to content

Recommended Posts

Posted

hello. im trying to make the mouse move with the keyboard but i get stuck here is my code

#Include <Misc.au3>

$sPos = MouseGetPos()

While 1

Sleep (100)

If _IsPressed("25") Then

MouseMove($sPos[0]-10,$sPos[1])

EndIf

WEnd

Posted (edited)
Posted

thanks, but when i try to make the mose move in the upper right direction it goes right than up.

can it go at the same time like the real mouse?

Posted

#Include <Misc.au3>
Global $Step = 25

While 1
    $sPos = MouseGetPos()
    If _IsPressed("25") And _IsPressed("26") Then
        MouseMove($sPos[0]-$Step,$sPos[1]-$Step)
    ElseIf _IsPressed("27") And _IsPressed("26") Then
        MouseMove($sPos[0]+$Step,$sPos[1]-$Step)
    ElseIf _IsPressed("25") And _IsPressed("28") Then
        MouseMove($sPos[0]-$Step,$sPos[1]+$Step)
    ElseIf _IsPressed("27") And _IsPressed("28") Then
        MouseMove($sPos[0]+$Step,$sPos[1]+$Step)
    ElseIf _IsPressed("25") Then
        MouseMove($sPos[0]-$Step,$sPos[1])
    ElseIf _IsPressed("26") Then
        MouseMove($sPos[0],$sPos[1]-$Step)
    ElseIf _IsPressed("27") Then
        MouseMove($sPos[0]+$Step,$sPos[1])
    ElseIf _IsPressed("28") Then
        MouseMove($sPos[0],$sPos[1]+$Step)
    EndIf
WEnd

Posted

thanks.

hey i triked to make run faster with a hotkey combination but i cant make it happend

here the code

#Include <Misc.au3>

While 1

$sPos = MouseGetPos()

if HotKeySet("^+!") than $Step = 25 else $Step = 6

end if

If _IsPressed("25") And _IsPressed("26") Then

MouseMove($sPos[0]-$Step,$sPos[1]-$Step,0)

ElseIf _IsPressed("27") And _IsPressed("26") Then

MouseMove($sPos[0]+$Step,$sPos[1]-$Step,0)

ElseIf _IsPressed("25") And _IsPressed("28") Then

MouseMove($sPos[0]-$Step,$sPos[1]+$Step,0)

ElseIf _IsPressed("27") And _IsPressed("28") Then

MouseMove($sPos[0]+$Step,$sPos[1]+$Step,0)

ElseIf _IsPressed("25") Then

MouseMove($sPos[0]-$Step,$sPos[1],0)

ElseIf _IsPressed("26") Then

MouseMove($sPos[0],$sPos[1]-$Step,0)

ElseIf _IsPressed("27") Then

MouseMove($sPos[0]+$Step,$sPos[1],0)

ElseIf _IsPressed("28") Then

MouseMove($sPos[0],$sPos[1]+$Step,0)

EndIf

sleep(1)

WEnd

Posted

hello, im trying to get the mouse move faster but i get stuck, can someone help me

here is my code

i want my scrip to be faster is i press ^+! so that the step becomes 25

#Include <Misc.au3>

$sPos = MouseGetPos()

if hotKeySet("^+!") then $Step = 6 else

$step=25

EndIf

While 1

If _IsPressed("25") And _IsPressed("26") Then

MouseMove($sPos[0]-$Step,$sPos[1]-$Step,0)

ElseIf _IsPressed("27") And _IsPressed("26") Then

MouseMove($sPos[0]+$Step,$sPos[1]-$Step,0)

ElseIf _IsPressed("25") And _IsPressed("28") Then

MouseMove($sPos[0]-$Step,$sPos[1]+$Step,0)

ElseIf _IsPressed("27") And _IsPressed("28") Then

MouseMove($sPos[0]+$Step,$sPos[1]+$Step,0)

ElseIf _IsPressed("25") Then

MouseMove($sPos[0]-$Step,$sPos[1],0)

ElseIf _IsPressed("26") Then

MouseMove($sPos[0],$sPos[1]-$Step,0)

ElseIf _IsPressed("27") Then

MouseMove($sPos[0]+$Step,$sPos[1],0)

ElseIf _IsPressed("28") Then

MouseMove($sPos[0],$sPos[1]+$Step,0)

EndIf

Sleep(1)

WEnd

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...