ihenvyr Posted November 7, 2005 Share Posted November 7, 2005 hello.. is it possible to emulate mouse movements with a hotkey? for example: left arrow moves mouse cursor to left right arrow moves mouse cursor to right ..etc pls.. any suggestions? thanks m8!! Umbrella Member Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 7, 2005 Moderators Share Posted November 7, 2005 I don't know if it works with the arrows... but take a look at IsPressed() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
w0uter Posted November 7, 2005 Share Posted November 7, 2005 to say it short: hotkeyset _bla func _bla while _ispressed mousemove wend endfunc My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
ihenvyr Posted November 8, 2005 Author Share Posted November 8, 2005 CTRL+SHIFT+(tilda) to exitHotKeySet("{LEFT}","weft") HotKeySet("{RIGHT}","wight") HotKeySet("^+`","bye") While 1 Sleep(10) WEnd Func bye() Exit EndFunc Func weft() Local $pos = MouseGetPos() MouseMove($pos[0] - 10, $pos[1],0) EndFunc Func wight() Local $pos = MouseGetPos() MouseMove($pos[0] + 10, $pos[1],0) EndFuncThanks Larry you're a champ!! ..but still confuse me bout the UP arrow and DOWN arrow?ive already spend 1 hour working but can't catch it!!please ..anybody HELP Umbrella Member Link to comment Share on other sites More sharing options...
themax90 Posted November 8, 2005 Share Posted November 8, 2005 Simple...expandcollapse popupHotKeySet( "w", "_UpArrow") HotKeySet( "s", "_DownArrow") HotKeySet( "a", "_Leftarrow") HotKeySet( "d", "_RightArrow") HotKeySet( "q", "_LeftClick") HotKeySet( "e", "_RightClick") HotKeySet( "{F10}", "_Close") $x = 100 $y = 100 $z = -1 MouseMove($x, $y) While 1 If $z = 0 Then Exit EndIf Wend Func _UpArrow() $y = $y - 10 MouseMove($x, $y, 0) EndFunc;==>_UpArrow Func _DownArrow() $y = $y + 10 MouseMove($x, $y, 0) EndFunc;==>_DownArrow Func _Leftarrow() $x = $x - 10 MouseMove($x, $y, 0) EndFunc;==>_Leftarrow Func _RightArrow() $x = $x + 10 MouseMove($x, $y, 0) EndFunc;==>_RightArrow Func _LeftClick() MouseClick( "left", $x, $y, 1, 0) EndFunc;==>_LeftClick Func _RightClick() MouseClick( "right", $x, $y, 1, 0) EndFunc;==>_RightClick Func _Close() $z = 0 Exit EndFunc;==>_Close W = UpMouse S = DownMouse A =LeftMouse D = RightMouse Q = LeftClick E = RightClick. I'm sure if you study the code it will help. Link to comment Share on other sites More sharing options...
ihenvyr Posted November 8, 2005 Author Share Posted November 8, 2005 Simple...expandcollapse popupHotKeySet( "w", "_UpArrow") HotKeySet( "s", "_DownArrow") HotKeySet( "a", "_Leftarrow") HotKeySet( "d", "_RightArrow") HotKeySet( "q", "_LeftClick") HotKeySet( "e", "_RightClick") HotKeySet( "{F10}", "_Close") $x = 100 $y = 100 $z = -1 MouseMove($x, $y) While 1 If $z = 0 Then Exit EndIf Wend Func _UpArrow() $y = $y - 10 MouseMove($x, $y, 0) EndFunc;==>_UpArrow Func _DownArrow() $y = $y + 10 MouseMove($x, $y, 0) EndFunc;==>_DownArrow Func _Leftarrow() $x = $x - 10 MouseMove($x, $y, 0) EndFunc;==>_Leftarrow Func _RightArrow() $x = $x + 10 MouseMove($x, $y, 0) EndFunc;==>_RightArrow Func _LeftClick() MouseClick( "left", $x, $y, 1, 0) EndFunc;==>_LeftClick Func _RightClick() MouseClick( "right", $x, $y, 1, 0) EndFunc;==>_RightClick Func _Close() $z = 0 Exit EndFunc;==>_CloseW = UpMouseS = DownMouseA =LeftMouseD = RightMouseQ = LeftClickE = RightClick.I'm sure if you study the code it will help.Thanks AutoIt Smith..its very usefull!! More Power!! Umbrella Member 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