seres Posted November 13, 2007 Posted November 13, 2007 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
ofLight Posted November 13, 2007 Posted November 13, 2007 im not sure i understand exactly what you want. 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
PsaltyDS Posted November 13, 2007 Posted November 13, 2007 ...here is my code...$sPos = MouseGetPos()if hotKeySet("^+!") then $Step = 25 else $step=6EndIfYou're not a big fan of the help file, are you? If HotKeySet()...??? 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
seres Posted November 13, 2007 Author Posted November 13, 2007 You're not a big fan of the help file, are you? If HotKeySet()...??? 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
seres Posted November 13, 2007 Author Posted November 13, 2007 im not sure i understand exactly what you want. 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now