Jump to content

Simply AutoMove and AutoClick


 Share

Recommended Posts

I try a simple script for automove and autoclick in this coordinates, the click it must remain pressed for 3 second, can help me?

This is script incomplete:

MouseMove(791,710,0)

MouseClick("left",791,710,2)

else

MouseMove(513,423,0)

MouseClick("left",513,423,1)

sleep(2000)

else

MouseMove(996,712,0)

MouseClick("left",996,712,1)

sleep(3500)

Link to comment
Share on other sites

This is script complete:

Opt("MouseClickDownDelay",3000)

if

MouseMove(632,415,0)

MouseClick("left",632,415,1)

else

MouseMove(513,423,0)

MouseClick("left",513,423,1)

sleep(2000)

else

MouseMove(996,712,0)

MouseClick("left",996,712,1)

sleep(3500)

EndIf

It's all ok?

Link to comment
Share on other sites

This is script complete:

Opt("MouseClickDownDelay",3000)
if
MouseMove(632,415,0)
MouseClick("left",632,415,1)
else
MouseMove(513,423,0)
MouseClick("left",513,423,1)
sleep(2000)
else
MouseMove(996,712,0)
MouseClick("left",996,712,1)
sleep(3500)
EndIf

It's all ok?

No, thats not how you call an if statement

This is proper syntax

If *Something* then
;Do something
Else
;Do something else
Endif

and you can only have 1 'else' per if statement unless you use 'ElseIf'

Link to comment
Share on other sites

Opt("MouseClickDownDelay",3000)

If $Connected = 1 Then

MouseMove(632,415,0)

MouseClick("left",632,415,1)

Else

MouseMove(513,423,0)

MouseClick("left",513,423,1)

sleep(2000)

ElseIf

MouseMove(996,712,0)

MouseClick("left",996,712,1)

sleep(3500)

EndIf

I have try in this mode and don't work :whistle:

Link to comment
Share on other sites

y do u have the mousemove there?

u could just have it mouseclick and the mouse will move 2 were u need it 2.

or u could do this:

Opt("MouseClickDownDelay",3000)
If $Connected = 1 Then
    MouseMove(632,415,0)
    MouseClick("left",632,415,1)
ElseIf $Connected = <what u wanted>
    MouseMove(996,712,0)
    MouseDown ( "left" )
    sleep(3500)
    MouseUp ( "left" )
Else
    MouseMove(513,423,0)
    MouseDown ( "left" )
     sleep(2000)
     MouseUp ( "left" )
EndIf
Link to comment
Share on other sites

y do u have the mousemove there?

u could just have it mouseclick and the mouse will move 2 were u need it 2.

or u could do this:

Opt("MouseClickDownDelay",3000)
If $Connected = 1 Then
    MouseMove(632,415,0)
    MouseClick("left",632,415,1)
ElseIf $Connected = <what u wanted>
    MouseMove(996,712,0)
    MouseDown ( "left" )
    sleep(3500)
    MouseUp ( "left" )
Else
    MouseMove(513,423,0)
    MouseDown ( "left" )
     sleep(2000)
     MouseUp ( "left" )
EndIf
I'm noob, i wanted a simply script for automove and autoclick in desire coordinate, i have compiled the your script and don't work, this is the error:

If $Connected = 1 Then

If ^ ERROR

Error: Variable used without being declared.

Link to comment
Share on other sites

do u have a full code?

or you just useing what we send..

you also need 2 send the varable to the elseif.. i did not no what u wanted it to be to i didnt fill it in.

if u have other code send it all plz

No, i don't have a full code, i have tried to make it alone

Link to comment
Share on other sites

$Connected = <"YOU MUST SAY WHAT YOU WANT HERE">
If $Connected = 1 Then
    MouseMove(632,415,0)
    MouseClick("left",632,415,1)
ElseIf $Connected = <"YOU MUST SAY WHAT YOU WANT HERE"> Then
    MouseMove(996,712,0)
    MouseDown ( "left" )
    sleep(3500)
    MouseUp ( "left" )
Else
    MouseMove(513,423,0)
    MouseDown ( "left" )
     sleep(2000)
     MouseUp ( "left" )
EndIf

just 2 let u no.. u dont have to compile a script 2 run it... u can save it as a au3 file then run it..

Edited by Golbez
Link to comment
Share on other sites

$Connected = <"YOU MUST SAY WHAT YOU WANT HERE">
If $Connected = 1 Then
    MouseMove(632,415,0)
    MouseClick("left",632,415,1)
ElseIf $Connected = <"YOU MUST SAY WHAT YOU WANT HERE"> Then
    MouseMove(996,712,0)
    MouseDown ( "left" )
    sleep(3500)
    MouseUp ( "left" )
Else
    MouseMove(513,423,0)
    MouseDown ( "left" )
     sleep(2000)
     MouseUp ( "left" )
EndIf

just 2 let u no.. u dont have to compile a script 2 run it... u can save it as a au3 file then run it..

ok when it is connected firefox, i can add: "$Connected = <firefoxexe>"? it's just?
Link to comment
Share on other sites

ok when it is connected firefox, i can add: "$Connected = <firefoxexe>"? it's just?

Look, if you want to have it auto-connect to the internet, your getting pretty complex for a first-time script

Check out these websites,

Welcome to Autoit 1-2-3:

http://www.autoitscript.com/forum/index.php?showtopic=21048

Online Helpfile:

http://www.autoitscript.com/autoit3/docs

In the online helpfile look at:

  • If...Then...Else loops
  • Run
  • MouseClick
  • MouseMove
and you should have enough for the disired effect you want Edited by Paulie
Link to comment
Share on other sites

ok.... do this.. explain what u want to do again cause i got no clue now..

of u want it 2 open firefox thats easy... or do u want it 2 say when firefox is on the internet?

I need the variable for start this script without error, not one in particular

Link to comment
Share on other sites

i got no clue what u want anymore.. sry

Oh, i have understand. Thanks man

$Connected = 1

If $Connected = 1 Then

MouseMove(632,415,0)

MouseClick("left",632,415,1)

ElseIf $Connected = 1

MouseMove(996,712,0)

MouseDown ( "left" )

sleep(3500)

MouseUp ( "left" )

Else

MouseMove(513,423,0)

MouseDown ( "left" )

sleep(2000)

MouseUp ( "left" )

EndIf

This script is work perfectly!! how I make to make that the script always works?

Link to comment
Share on other sites

i got no clue what u want anymore.. sry

Ya, you're explain things incoherently, so lets start from the begining,

Ask yourself these questions:

  • What do you want your script to do(In detail)?
  • What is it doing wrong now?
  • What information do I have that might make it easier for the nice people on the Autoit forums(Coordinates, Pixelcolors, other specifics)?
  • Have I looked at all possible tutorial sites and still have not found or understood the answers I'm looking for?
@Junlg -

If you mean Repeat, look for While...WEnd in the online helpfile

Edited by Paulie
Link to comment
Share on other sites

Ya, you're explain things incoherently, so lets start from the begining,

Ask yourself these questions:

  • What do you want your script to do(In detail)?
  • What is it doing wrong now?
  • What information do I have that might make it easier for the nice people on the Autoit forums(Coordinates, Pixelcolors, other specifics)?
  • Have I looked at all possible tutorial sites and still have not found or understood the answers I'm looking for?
@Junlg -

If you mean Repeat, look for While...WEnd in the online helpfile

Yes, the script og Golbez is complete, i need only the Repeat function for always

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