fairlyfrank Posted January 1, 2007 Posted January 1, 2007 I have been making an automator and I want to place some input boxes that you can insert mouse positions and then when I press start it goes to that place on the screen. Can you please help me out with this one? :">
locomaestro Posted January 1, 2007 Posted January 1, 2007 Do u want to make a gui because u said when I press start it will go to that place? Or do u just want to add a hotkeyset?
locomaestro Posted January 1, 2007 Posted January 1, 2007 Global $x = 0 Global $y = 0 Hotkeyset("(button u want to press 2 place coordinates)","place") Hotkeyset("(button u want to press 2 move mouse)","move") Func place() $place2move = inputbox("cordinates","insert cordinates","coordinates") $cordinate = stringsplit($place2move,",") $x = $place2move[1] $y = $place2move[2] Endfunc Func move() Mousemove($x,$y) Endfunc While 1 Sleep(1) Wend
locomaestro Posted January 1, 2007 Posted January 1, 2007 Forgot don't forget to put a comma between x and y to distinguish x and y And change the hotkeyset to any button u want
fairlyfrank Posted January 2, 2007 Author Posted January 2, 2007 locomaestro said: Forgot don't forget to put a comma between x and y to distinguish x and yAnd change the hotkeyset to any button u wantTHANK YOU VERY MUCH YOU ARE A TRUE HERO!!!!!!!!! I LOVE YOU MAN I DO
_Kurt Posted January 2, 2007 Posted January 2, 2007 fairlyfrank said: THANK YOU VERY MUCH YOU ARE A TRUE HERO!!!!!!!!! I LOVE YOU MAN I DO Easy big fella lol. I'm sure locomaestro feels the same way about you. Kurt Awaiting Diablo III..
fairlyfrank Posted January 2, 2007 Author Posted January 2, 2007 _Kurt said: Easy big fella lol. I'm sure locomaestro feels the same way about you. KurtKurt how do you involve that script into a GUI????
_Kurt Posted January 2, 2007 Posted January 2, 2007 (edited) For example: #include <Guiconstants.au3> GuiCreate("MouseMovements") $x = GuiCtrlCreateinput("",10, 5) $y = GuiCtrlCreateinput("",10,30) $go = GuiCtrlCreatebutton("Move the mouse!", 10, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $go $x1 = GuiCtrlRead($x) $y1 = GuiCtrlRead($y) Msgbox(0,"","Now moving mouse to: " & $x1 & ", " & $y1) MouseMove($x1, $y1) EndSelect WEnd UNTESTED 1st input = the X position of the mousemove 2nd input = the Y position of the mousemove Tell me if that's not what you want and I will be glad to help, Kurt Edited January 2, 2007 by _Kurt Awaiting Diablo III..
fairlyfrank Posted January 2, 2007 Author Posted January 2, 2007 _Kurt said: For example: #include <Guiconstants.au3> GuiCreate("MouseMovements") $x = GuiCtrlCreateinput("",10, 5) $y = GuiCtrlCreateinput("",10,30) $go = GuiCtrlCreatebutton("Move the mouse!", 10, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $go $x1 = GuiCtrlRead($x) $y1 = GuiCtrlRead($y) Msgbox(0,"","Now moving mouse to: " & $x1 & ", " & $y1) MouseMove($x1, $y1) EndSelect WEnd UNTESTED 1st input = the X position of the mousemove 2nd input = the Y position of the mousemove Tell me if that's not what you want and I will be glad to help, Kurt Thank you very much sir
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