Jump to content
Sign in to follow this  
Cloudsx

mouse control and mouse click

Recommended Posts

Cloudsx

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

Share this post


Link to post
Share on other sites
Sparrowlord

I think this is what you wanted, its rather sloppy though.

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

Share this post


Link to post
Share on other sites
death pax

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

Share this post


Link to post
Share on other sites
Cloudsx

something like that but is it going back to the begin of the mousemove then mouse click

Share this post


Link to post
Share on other sites
Cloudsx

but how is this going to work and where do i have to place it

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

Share this post


Link to post
Share on other sites
Sparrowlord

but how is this going to work and where do i have to place it

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

Just put that at the top of the script, and when you push the esc key, it will exit the script. ( Thats if your using what I posted )

Share this post


Link to post
Share on other sites
Cloudsx

it says it has a wrong code

error: unknown function name

Share this post


Link to post
Share on other sites
Sparrowlord

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

Share this post


Link to post
Share on other sites
Cloudsx

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

Share this post


Link to post
Share on other sites
Cloudsx

dont look to the strange langues it dutch :o

Share this post


Link to post
Share on other sites
Sparrowlord

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.

Share this post


Link to post
Share on other sites
Cloudsx

thanks this is what i meen

Share this post


Link to post
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
Sign in to follow this  

×