Jump to content

Recommended Posts

Posted

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? :">

Posted

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

Posted

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

THANK YOU VERY MUCH YOU ARE A TRUE HERO!!!!!!!!! I LOVE YOU MAN I DO :P

Posted

THANK YOU VERY MUCH YOU ARE A TRUE HERO!!!!!!!!! I LOVE YOU MAN I DO :P

Easy big fella lol. I'm sure locomaestro feels the same way about you. :D

Kurt

Awaiting Diablo III..

Posted (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 by _Kurt

Awaiting Diablo III..

Posted

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 :P

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...