Jump to content

Help with input box


Recommended Posts

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

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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