Jump to content

Recommended Posts

Posted

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)

Posted (edited)

hello and welkome!

yes.. its possible:

set this on top of the script, then it will click 3 seconds!

Opt("MouseClickDownDelay",3000)

so long spider

Edited by GtaSpider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Posted

hello and welkome!

yes.. its possible:

set this on top of the script, then it will click 3 seconds!

Opt("MouseClickDownDelay",3000)

so long spider

Thanks :whistle:
Posted

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?

Posted

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'

Posted

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:

Posted

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
Posted

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.

Posted

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

Posted

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

Posted (edited)

$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
Posted

$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?
Posted

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?

Posted (edited)

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
Posted

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

Posted

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?

Posted (edited)

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
Posted

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

Posted

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

like i said... try the helpfile

learn to read it before posting

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