Jump to content

mouse move faster


seres
 Share

Recommended Posts

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 = 25 else

$step=6

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

Link to comment
Share on other sites

im not sure i understand exactly what you want. :P

I also am not sure you can JUST use modifier keys when setting a Hotkey I think it hasto be like Modifier+modifier+Key or somethin like that. So in my example I set F1 instead.

#Include <Misc.au3>

HotKeySet("{F1}","_SetStep")

$sPos = MouseGetPos()
$step = 6

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

Func _SetStep()
    $Step = 25
EndFunc

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Link to comment
Share on other sites

...

here is my code

...

$sPos = MouseGetPos()

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

$step=6

EndIf

You're not a big fan of the help file, are you? If HotKeySet()...??? :P

Read the help file on HotKeySet() and look at the example there.

Then and Else on the same line...??? ;)

Read the help file on If/Then/Else/EndIf and look at the example there.

(Are you detecting a pattern here?)

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You're not a big fan of the help file, are you? If HotKeySet()...??? :P

Read the help file on HotKeySet() and look at the example there.

Then and Else on the same line...??? ;)

Read the help file on If/Then/Else/EndIf and look at the example there.

(Are you detecting a pattern here?)

:)

i read it and i found hotkeyset but i thought it will work with out a function and yust with ("^+!").

i gess i didnt undestand

Link to comment
Share on other sites

im not sure i understand exactly what you want. :P

I also am not sure you can JUST use modifier keys when setting a Hotkey I think it hasto be like Modifier+modifier+Key or somethin like that. So in my example I set F1 instead.

#Include <Misc.au3>

HotKeySet("{F1}","_SetStep")

$sPos = MouseGetPos()
$step = 6

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

Func _SetStep()
    $Step = 25
EndFunc

thanks for the help

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...