cdkid Posted January 5, 2006 Posted January 5, 2006 (edited) this is a little useless script i made when i was bored... mouse control arrow keys to move mouse, + key on the numpad to click, and \ to right click: expandcollapse popupwhile 1 HotKeySet("{UP}","up") HotKeySet("{DOWN}","down") HotKeySet("{LEFT}","left") HotKeySet("{RIGHT}","right") HotKeySet("{NUMPADADD}","click") HotKeySet("\","rclick") wend func up() local $array = MouseGetPos() local $x = $array[0] local $y = $array[1] - 15 mousemove($x,$y,2) endfunc func down() local $array = MouseGetPos() local $x = $array[0] local $y = $array[1] + 15 mousemove($x,$y,2) EndFunc func left() local $array = MouseGetPos() local $x = $array[0] - 15 local $y = $array[1] mousemove($x,$y,2) EndFunc func right() local $array = MouseGetPos() local $x = $array[0] + 15 local $y = $array[1] mousemove($x,$y,2) endfunc func click() mouseclick("left") EndFunc Func rclick() mouseclick("right") EndFunc Edited January 5, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Shinies Posted January 6, 2006 Posted January 6, 2006 lol i made the same script wen i was bored a little while ago. the clicking is kinda messed up for me tho when i click on icons.
DJ VenGenCe Posted January 6, 2006 Posted January 6, 2006 Based on your Code, I added some diagnals to this. Using a standard Keyboard, you can use Home, End, Pgup and Pg Down on an old-style keyboard. I added to the code, + an exit function to use the ESC Key to exit. Cool idea to feed off. Thanks for the code! expandcollapse popupwhile 1 ;normal updownleftright HotKeySet("{ESC}", "endit") HotKeySet("{UP}","up") HotKeySet("{DOWN}","down") HotKeySet("{LEFT}","left") HotKeySet("{RIGHT}","right") ;diags HotKeySet("{HOME}","upleft") HotKeySet("{END}","downleft") HotKeySet("{PGUP}", "upright") HotKeySet("{PGDN}", "downright") HotKeySet("{NUMPADADD}","click") HotKeySet("\","rclick") wend func up() local $array = MouseGetPos() local $x = $array[0] local $y = $array[1] - 15 mousemove($x,$y,2) endfunc func down() local $array = MouseGetPos() local $x = $array[0] local $y = $array[1] + 15 mousemove($x,$y,2) EndFunc func left() local $array = MouseGetPos() local $x = $array[0] - 15 local $y = $array[1] mousemove($x,$y,2) EndFunc func right() local $array = MouseGetPos() local $x = $array[0] + 15 local $y = $array[1] mousemove($x,$y,2) endfunc func upleft() local $array = MouseGetPos() local $x = $array[0] - 15 local $y = $array[1] - 15 mousemove($x,$y,2) endfunc func downleft() local $array = MouseGetPos() local $x = $array[0] - 15 local $y = $array[1] + 15 mousemove($x,$y,2) EndFunc func upright() local $array = MouseGetPos() local $x = $array[0] + 15 local $y = $array[1] - 15 mousemove($x,$y,2) endfunc func downright() local $array = MouseGetPos() local $x = $array[0] + 15 local $y = $array[1] + 15 mousemove($x,$y,2) endfunc func click() mouseclick("left") EndFunc Func rclick() mouseclick("right") EndFunc func endit() exit EndFunc
cdkid Posted January 6, 2006 Author Posted January 6, 2006 thanks AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
cdkid Posted January 6, 2006 Author Posted January 6, 2006 only thing i couldnt figure out was how to click & drag.... AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
TK_Incorperate Posted January 9, 2006 Posted January 9, 2006 Maybe set a different button to hold mouse, and another button to let the mouse up. For example like this.... HotKeySet("RALT}", "Mdown") HotKeySet("RCTRL}", "Mup") Func Mdown() MouseDown("left") EndFunc Func Mup() MouseUp("left") EndFunc You only need one control and alt anyways lol, then you just hafta find more keys to use for the right click. (if you cant tell, this holds down the left mouse button when pressing the right Alt button, and lets go of the left mouse botton when you press the right Ctrl button) Not sure if this will work because i havent tried it, but in theory it should be perfectly fine.
w0uter Posted January 9, 2006 Posted January 9, 2006 why not just send ALT+SHIFT+NUMLOCK and control it with the keypad. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
TK_Incorperate Posted January 9, 2006 Posted January 9, 2006 why not just send ALT+SHIFT+NUMLOCK and control it with the keypad.Because it's always funner knowing you made it yourself lol
w0uter Posted January 9, 2006 Posted January 9, 2006 well ... thats true My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
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