seres Posted November 13, 2007 Share Posted November 13, 2007 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 Link to comment Share on other sites More sharing options...
Jex Posted November 13, 2007 Share Posted November 13, 2007 (edited) #Include <Misc.au3> Global $Step = 25 While 1 $sPos = MouseGetPos() If _IsPressed("25") Then MouseMove($sPos[0]-$Step,$sPos[1]) If _IsPressed("26") Then MouseMove($sPos[0],$sPos[1]-$Step) If _IsPressed("27") Then MouseMove($sPos[0]+$Step,$sPos[1]) If _IsPressed("28") Then MouseMove($sPos[0],$sPos[1]+$Step) WEnd Edited November 13, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
seres Posted November 13, 2007 Author Share Posted November 13, 2007 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? Link to comment Share on other sites More sharing options...
Jex Posted November 13, 2007 Share Posted November 13, 2007 #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 My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 13, 2007 Share Posted November 13, 2007 This was double posted. Another answer given in other topic.@seres: Don't double post your questions on this forum. 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 More sharing options...
seres Posted November 13, 2007 Author Share Posted November 13, 2007 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 Link to comment Share on other sites More sharing options...
seres Posted November 13, 2007 Author Share Posted November 13, 2007 sorry for the double, i thought that my question didnt get posted so i writed again Link to comment Share on other sites More sharing options...
seres Posted November 13, 2007 Author Share 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 = 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 Link to comment Share on other sites More sharing options...
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