Junlg Posted August 7, 2006 Share Posted August 7, 2006 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 More sharing options...
GtaSpider Posted August 7, 2006 Share Posted August 7, 2006 (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 August 7, 2006 by GtaSpider www.AutoIt.de - Moderator of the German AutoIt Forum Link to comment Share on other sites More sharing options...
Junlg Posted August 7, 2006 Author Share Posted August 7, 2006 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 Link to comment Share on other sites More sharing options...
Junlg Posted August 7, 2006 Author Share Posted August 7, 2006 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 More sharing options...
Paulie Posted August 7, 2006 Share Posted August 7, 2006 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 More sharing options...
Junlg Posted August 7, 2006 Author Share Posted August 7, 2006 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 Link to comment Share on other sites More sharing options...
Golbez Posted August 7, 2006 Share Posted August 7, 2006 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 More sharing options...
Junlg Posted August 7, 2006 Author Share Posted August 7, 2006 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 More sharing options...
Golbez Posted August 7, 2006 Share Posted August 7, 2006 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 Link to comment Share on other sites More sharing options...
Junlg Posted August 7, 2006 Author Share Posted August 7, 2006 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 plzNo, i don't have a full code, i have tried to make it alone Link to comment Share on other sites More sharing options...
Golbez Posted August 7, 2006 Share Posted August 7, 2006 (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 August 7, 2006 by Golbez Link to comment Share on other sites More sharing options...
Junlg Posted August 7, 2006 Author Share Posted August 7, 2006 $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 More sharing options...
Golbez Posted August 7, 2006 Share Posted August 7, 2006 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? Link to comment Share on other sites More sharing options...
Paulie Posted August 7, 2006 Share Posted August 7, 2006 (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 scriptCheck out these websites, Welcome to Autoit 1-2-3:http://www.autoitscript.com/forum/index.php?showtopic=21048Online Helpfile:http://www.autoitscript.com/autoit3/docsIn the online helpfile look at:If...Then...Else loopsRunMouseClickMouseMoveand you should have enough for the disired effect you want Edited August 7, 2006 by Paulie Link to comment Share on other sites More sharing options...
Junlg Posted August 7, 2006 Author Share Posted August 7, 2006 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 More sharing options...
Golbez Posted August 7, 2006 Share Posted August 7, 2006 i got no clue what u want anymore.. sry Link to comment Share on other sites More sharing options...
Junlg Posted August 8, 2006 Author Share Posted August 8, 2006 i got no clue what u want anymore.. sryOh, i have understand. Thanks man$Connected = 1If $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 More sharing options...
Paulie Posted August 8, 2006 Share Posted August 8, 2006 (edited) i got no clue what u want anymore.. sryYa, 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 August 8, 2006 by Paulie Link to comment Share on other sites More sharing options...
Junlg Posted August 8, 2006 Author Share Posted August 8, 2006 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 helpfileYes, the script og Golbez is complete, i need only the Repeat function for always Link to comment Share on other sites More sharing options...
Paulie Posted August 8, 2006 Share Posted August 8, 2006 Yes, the script og Golbez is complete, i need only the Repeat function for alwayslike i said... try the helpfilelearn to read it before posting Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now