Jump to content

mouse control and mouse click


Cloudsx
 Share

Recommended Posts

i make something with mouse control and mouse click

and i can do it but only 1 time

how can i do it again and again

i order my mouse to go go X600 Y700 then click

then i want the mouse going to X800 Y900 then click

then i want the mouse going back to X600 Y700 then click

then i want the mouse going to X800 Y900 then click

how can i do something like this

that he every time going back to the start

here i show you

MouseMove (900, 700, 50)

MouseClick ("left", 900,700,2,50)

MouseMove (980, 670, 50)

Mouseclick ("left",980,670,2,80)

if the last click has made then i want he to return to mousemove (900, 700, 50)

then again and again

Edited by Cloudsx
Link to comment
Share on other sites

it says it has a wrong code

error: unknown function name

Make sure you have this exact.

HotKeySet("{ESC}", "quit")


$i = 0
While $i <= 10
MouseMove (900, 700, 50)
MouseClick ("left", 900,700,2,50)
MouseMove (980, 670, 50)
Mouseclick ("left",980,670,2,80)

    $i = $i + 0
WEnd

Func quit()
Exit
EndFunc
Link to comment
Share on other sites

wait i will give the script and you say you put in where to put the thing oke

this is the script

CODE

#include <GUIConstants.au3>

GUICreate("BOT",300,300 ) ; will create a dialog box that when displayed is centered

GUISetState (@SW_SHOW) ; will display an empty dialog box

$widthCell=300

GUICtrlCreateLabel ("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)

GuiCtrlCreateLabel("hoeveel uur wil je gebruiken",0, 170,)

GuiCtrlCreateInput("0",0, 150, 23, 20)

GuiCtrlCreateUpDown(1)

Opt("GUICoordMode",3)

$start = GUICtrlCreateButton ("start", 100, 250,50)

GUICtrlCreateButton ("stop", 150, 250,50)

GUISetState () ; will display an dialog box with 2 button

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

If $msg = $start Then ExitLoop

Wend

While 2

MouseMove (900, 700, 50)

MouseClick ("left", 900,700,2,50)

MouseMove (980, 670, 50)

Mouseclick ("left",980,670,2,80)

WEnd

Link to comment
Share on other sites

Try This,

#include <GUIConstants.au3>
HotKeySet("{ESC}", "quit")

GUICreate("BOT",300,300 ); will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW); will display an empty dialog box


$widthCell=300
GUICtrlCreateLabel ("dit is een BOT die je DW warrior traint", 10, 30, $widthCell)
GuiCtrlCreateLabel("hoeveel uur wil je gebruiken",0, 170,)
GuiCtrlCreateInput("0",0, 150, 23, 20)
GuiCtrlCreateUpDown(1)


Opt("GUICoordMode",3)
$start = GUICtrlCreateButton ("start", 100, 250,50)
GUICtrlCreateButton ("stop", 150, 250,50)

GUISetState (); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
If $msg = $start Then ExitLoop

Wend


While 2
MouseMove (900, 700, 50)
MouseClick ("left", 900,700,2,50)
MouseMove (980, 670, 50)
Mouseclick ("left",980,670,2,80)
WEnd

Func quit()
Exit
EndFunc

Is that what you want?. Now you can start it and push the esc key to exit.

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