datkewlguy Posted January 6, 2005 Posted January 6, 2005 (edited) ;Okay Sean and I worked on this for a while and we came up with this, its like the ;one sean (erifash) has posted but now you can move diagnally as well by holding ;ctrl when hitting the arrows. Neat lil script, tell me whatcha think! Opt("TrayIconHide", 1) HotkeySet("{UP}", "n") HotkeySet("{DOWN}", "s") HotkeySet("{RIGHT}", "e") HotkeySet("{LEFT}", "w") HotkeySet("^{DOWN}", "se") HotkeySet("^{UP}", "nw") HotkeySet("^{LEFT}", "sw") HotkeySet("^{RIGHT}", "ne") HotkeySet("{F3}", "leftc") HotkeySet("{F4}", "rightc") HotKeySet("{NUMPAD1}", "sp1") HotKeySet("{NUMPAD2}", "sp2") HotKeySet("{NUMPAD3}", "sp3") HotKeySet("{NUMPAD4}", "sp4") HotKeySet("{NUMPAD5}", "sp5") HotKeySet("{NUMPAD6}", "sp6") HotKeySet("{NUMPAD7}", "sp7") HotKeySet("{NUMPAD8}", "sp8") HotKeySet("{NUMPAD9}", "sp9") HotkeySet("^{F11}", "myexit") $sp = 20 $left = "up" $right = "up" While 1 Sleep(10) If _IsPressed('70') = 1 and $left = "up" Then $left = "down" MouseDown("left") EndIf If _IsPressed('70') = 0 and $left = "down" Then $left = "up" MouseUp("left") EndIf If _IsPressed('71') = 1 and $right = "up" Then $right = "down" MouseDown("right") EndIf If _IsPressed('71') = 0 and $right = "down" Then $right = "up" MouseUp("right") EndIf Wend Func myexit() Exit EndFunc Func none() EndFunc Func _IsPressed($hexKey) ; $hexKey must be the value of one of the keys. ; _IsPressed will return 0 if the key is not pressed, 1 if it is. Local $aR, $bRv;$hexKey $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) ;If $aR[0] = -32767 Then If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRv EndFunc ;==>_IsPressed Func n() $pos = MouseGetPos() MouseMove($pos[0], $pos[1] - $sp, 1) EndFunc Func s() $pos = MouseGetPos() MouseMove($pos[0], $pos[1] + $sp, 1) EndFunc Func e() $pos = MouseGetPos() MouseMove($pos[0] + $sp, $pos[1], 1) EndFunc Func w() $pos = MouseGetPos() MouseMove($pos[0] - $sp, $pos[1], 1) EndFunc Func se() $pos = MouseGetPos() MouseMove($pos[0] + $sp, $pos[1] + $sp, 1) EndFunc Func nw() $pos = MouseGetPos() MouseMove($pos[0] + $sp, $pos[1] - $sp, 1) EndFunc Func ne() $pos = MouseGetPos() MouseMove($pos[0] + $sp, $pos[1] - $sp, 1) EndFunc Func sw() $pos = MouseGetPos() MouseMove($pos[0] - $sp, $pos[1] + $sp, 1) EndFunc Func leftc() $pos = MouseGetPos() MouseClick("left", $pos[0], $pos[1], 1, 1) EndFunc Func rightc() $pos = MouseGetPos() MouseClick("right", $pos[0], $pos[1], 1, 1) EndFunc Func sp1() $sp = 1 EndFunc Func sp2() $sp = 5 EndFunc Func sp3() $sp = 10 EndFunc Func sp4() $sp = 15 EndFunc Func sp5() $sp = 20 EndFunc Func sp6() $sp = 30 EndFunc Func sp7() $sp = 50 EndFunc Func sp8() $sp = 70 EndFunc Func sp9() $sp = 100 EndFunc ;Also, turn numlock on and control the speed/amt of pixels each ;movement moves by hitting the numpad (1-9) ;Ctrl F11 is exit Edited January 6, 2005 by datkewlguy
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