LonelyRaven Posted December 14, 2004 Posted December 14, 2004 (edited) Ok I had a script from version 2.0 that looked like this and it worked fine. But... (Continued down past code) expandcollapse popupreturn GoSub, craft1 GoSub, craft2 GoSub, craft3 GoSub, craft1 GoSub, craft2 GoSub, craft3 Send, /sit{ENTER} GoSub, craft1 GoSub, craft2 GoSub, craft3 GoSub, craft1 GoSub, craft2 GoSub, craft3 Send, /stand{ENTER} craft1: LeftClick,322,51;Craft Tool #1 Sleep, 3000 LeftClick,345,315;Tissues Tab Sleep, 3000 LeftClick,215, 495;Micronutrient Supplement Send, {ENTER} Sleep, 5000 LeftClick,230, 205;Berries LeftClick,230, 205;Berries LeftClick,230, 205;Berries LeftClick,230, 205;Berries Sleep, 5000 LeftClick,275, 205;Meat LeftClick,275, 205;Meat LeftClick,275, 205;Meat LeftClick,275, 205;Meat Sleep, 5000 Send, {ENTER} Sleep, 2500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 5000 return craft2: LeftClick,355, 51;Craft Tool #1 Sleep, 3000 LeftClick,345,315;Tissues Tab Sleep, 3000 LeftClick,215, 495;Micronutrient Supplement Send, {ENTER} Sleep, 5000 LeftClick,230, 205;Berries LeftClick,230, 205;Berries LeftClick,230, 205;Berries LeftClick,230, 205;Berries Sleep, 5000 LeftClick,275, 205;Meat LeftClick,275, 205;Meat LeftClick,275, 205;Meat LeftClick,275, 205;Meat Sleep, 5000 Send, {ENTER} Sleep, 2500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 5000 return craft3: LeftClick,385, 51;Craft Tool #1 Sleep, 3000 LeftClick,345,315;Tissues Tab Sleep, 3000 LeftClick,215, 495;Micronutrient Supplement Send, {ENTER} Sleep, 5000 LeftClick,230, 205;Berries LeftClick,230, 205;Berries LeftClick,230, 205;Berries LeftClick,230, 205;Berries Sleep, 5000 LeftClick,275, 205;Meat LeftClick,275, 205;Meat LeftClick,275, 205;Meat LeftClick,275, 205;Meat Sleep, 5000 Send, {ENTER} Sleep, 2500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 3500 Send, {ENTER} Sleep, 5000 return But it was having repeating errors and after so many loops itd just close out and then I noticed V3 had an ability to repeat easily so I downloaded it and used the "Script Converter" and then typed WinActivate("SwgClient") while 1 sleep( 3000) <---At the top sleep( 3000) <---at the Bottom wend And now it says there is no matching Wend for While 1 whenever I try and open the script for testing. The script looks like this\/(Down). Could someone kindly tell me how I could fix it And/Or fix the AutoItV2 script so that it loops enough that I could go to school and comeback with it still looping? That would be awesome! By the way.. Im still learning!:-) I got this script from a forum and I learned the coordinates but I'm still learning the "How To" about things in "Auto-It" Aim:LonelyRaven000 Email LonelyRaven0000@yahoo.com expandcollapse popupWinActivate("SwgClient") while 1 sleep( 3000) craft1 ( ) craft2 ( ) craft3 ( ) craft1 ( ) craft2 ( ) craft3 ( ) Send ( '/sit{ENTER}' ) craft1 ( ) craft2 ( ) craft3 ( ) craft1 ( ) craft2 ( ) craft3 ( ) Send ( '/stand{ENTER}' ) Func craft1 ( ) MouseClick( "left", 322, '51;Craft Tool #1' ) Sleep ( 3000 ) MouseClick( "left", 345, '315;Tissues Tab' ) Sleep ( 3000 ) MouseClick( "left", 215, '495;Micronutrient Supplement' ) Send ( '{ENTER}' ) Sleep ( 5000 ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) Sleep ( 5000 ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) Sleep ( 5000 ) Send ( '{ENTER}' ) Sleep ( 2500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 5000 ) Return EndFunc ; craft1 Func craft2 ( ) MouseClick( "left", 355, '51;Craft Tool #1' ) Sleep ( 3000 ) MouseClick( "left", 345, '315;Tissues Tab' ) Sleep ( 3000 ) MouseClick( "left", 215, '495;Micronutrient Supplement' ) Send ( '{ENTER}' ) Sleep ( 5000 ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) Sleep ( 5000 ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) Sleep ( 5000 ) Send ( '{ENTER}' ) Sleep ( 2500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 5000 ) Return EndFunc ; craft2 Func craft3 ( ) MouseClick( "left", 385, '51;Craft Tool #1' ) Sleep ( 3000 ) MouseClick( "left", 345, '315;Tissues Tab' ) Sleep ( 3000 ) MouseClick( "left", 215, '495;Micronutrient Supplement' ) Send ( '{ENTER}' ) Sleep ( 5000 ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) MouseClick( "left", 230, '205;Berries' ) Sleep ( 5000 ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) MouseClick( "left", 275, '205;Meat' ) Sleep ( 5000 ) Send ( '{ENTER}' ) Sleep ( 2500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 5000 ) Return EndFunc ; craft3 Sleep( 3000) wend PLEASE HELP! Edited December 14, 2004 by LonelyRaven
Dalarn Posted December 14, 2004 Posted December 14, 2004 (edited) ...a... Edited December 20, 2004 by Dalarn
phillip123adams Posted December 14, 2004 Posted December 14, 2004 Move the functions outside of the While loop. Phillip
MHz Posted December 14, 2004 Posted December 14, 2004 (edited) Altered\Moved to my next post. Edited December 15, 2004 by MHz
LonelyRaven Posted December 14, 2004 Author Posted December 14, 2004 (edited) Wow! YOU GUYS ARE SO AWESOME! I love this website and program! Lemme see if it works.. Ill get back to you:-) Edited December 14, 2004 by LonelyRaven
LonelyRaven Posted December 15, 2004 Author Posted December 15, 2004 Oh no.... It's not working it will just sit there idle after it gets through the first three parts.. Cause the Pause 1 second is on repeat.. I want the whole thing to repeat
phillip123adams Posted December 15, 2004 Posted December 15, 2004 Oh no.... It's not working it will just sit there idle after it gets through the first three parts.. Cause the Pause 1 second is on repeat.. I want the whole thing to repeat<{POST_SNAPBACK}>Send the code, and I'll take a look. Phillip
MHz Posted December 15, 2004 Posted December 15, 2004 (edited) Sorry, Try this. expandcollapse popupWinActivate("SwgClient") HotKeySet('!e', 'Leave'); Set Alt-E to Exit While 1 craft1 ( ) craft2 ( ) craft3 ( ) craft1 ( ) craft2 ( ) craft3 ( ) Send ( '/sit{ENTER}' ) craft1 ( ) craft2 ( ) craft3 ( ) craft1 ( ) craft2 ( ) craft3 ( ) Send ( '/stand{ENTER}' ) WEnd Func Leave(); Alt-E Hotkey function Exit EndFunc Func craft1 ( ) MouseClick( "left", 322, 51 );Craft Tool #1 Sleep ( 3000 ) MouseClick( "left", 345, 315 );Tissues Tab Sleep ( 3000 ) MouseClick( "left", 215, 495 );Micronutrient Supplement Send ( '{ENTER}' ) Sleep ( 5000 ) MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries Sleep ( 5000 ) MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat Sleep ( 5000 ) Send ( '{ENTER}' ) Sleep ( 2500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 5000 ) EndFunc ; craft1 Func craft2 ( ) MouseClick( "left", 355, 51 );Craft Tool #1 Sleep ( 3000 ) MouseClick( "left", 345, 315 );Tissues Tab Sleep ( 3000 ) MouseClick( "left", 215, 495 );Micronutrient Supplement Send ( '{ENTER}' ) Sleep ( 5000 ) MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries Sleep ( 5000 ) MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat Sleep ( 5000 ) Send ( '{ENTER}' ) Sleep ( 2500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 5000 ) EndFunc ; craft2 Func craft3 ( ) MouseClick( "left", 385, 51 );Craft Tool #1 Sleep ( 3000 ) MouseClick( "left", 345, 315 );Tissues Tab Sleep ( 3000 ) MouseClick( "left", 215, 495 );Micronutrient Supplement Send ( '{ENTER}' ) Sleep ( 5000 ) MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries MouseClick( "left", 230, 205 );Berries Sleep ( 5000 ) MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat MouseClick( "left", 275, 205 );Meat Sleep ( 5000 ) Send ( '{ENTER}' ) Sleep ( 2500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 3500 ) Send ( '{ENTER}' ) Sleep ( 5000 ) EndFunc ; craft3 Edited December 15, 2004 by MHz
phillip123adams Posted December 15, 2004 Posted December 15, 2004 Sorry, Try this.<{POST_SNAPBACK}>MHz, the following is from the attachment you sent a few minutes ago.Func Exit() ; Alt-E Hotkey function ExitFuncThe function EXIT fails the syntax check because it is a reserved word. And the closing statement should be EndFunc. Phillip
MHz Posted December 15, 2004 Posted December 15, 2004 Yes, opps. I was trying to make it look straight forward but used a command as a function name. Please check again, as I have reattached it. :">
phillip123adams Posted December 15, 2004 Posted December 15, 2004 Yes, opps. I was trying to make it look straight forward but used a command as a function name. Please check again, as I have reattached it. :"><{POST_SNAPBACK}>Nope! The closing statement is still mispelled. Here's the correction.Func Leave() ; Alt-E Hotkey function ExitEndFuncBTW, aren't you the SciTe guy? That's what I used to check it. It a damn fine editor!!! Phillip
MHz Posted December 15, 2004 Posted December 15, 2004 Thanks phillip123adams. Changed it back to Au3 format so I could use Scite to error check.
Doxie Posted December 15, 2004 Posted December 15, 2004 (edited) Is it possible to make the leftclick random within a square?So instead of using fixed pointing, it would just use random leftclick within a fixed square.MouseClick( "left", 230, 205 );Berries230 and 205 should be somewhere within 200-240 / 200-220 (example)Is it also possible to make the sleep random within a fixed time?Sleep ( 5000 )5000 should be something between 4-7 second.Thanks in advanceEDIT:Maybe i should look in the help file before i post here ;Random Sleep $Sleepchange = Int(Random(4000, 7000)); generate an integer between 4000 and 7000 $Sleep = $Sleep + $Sleepchange MsgBox(4096, "Sleep", "You have been sleeping" & $Sleep);Random Click $LCChange1 = Int(Random(200, 240)); generate an integer between 200 and 240 $LC1 = $LC1 + $LCChange1 MsgBox(4096, "Lefclick", "Position 1 " & $LC1) $LCChange2 = Int(Random(200, 220)); generate an integer between 200 and 220 $LC2 = $LC2 + $LCChange2 MsgBox(4096, "Lefclick", "Position 2 " & $LC2) MouseClick( "left", $LC1, $LC2 );Berrieswoow, actually the first time i got something to work from the start Both random sleep and click works great.Now we just have to figure out the positions of the boxes.Do you know if window spy works for this? Edited December 15, 2004 by Doxie Were ever i lay my script is my home...
Doxie Posted December 16, 2004 Posted December 16, 2004 I tried the script yesterday, and it works really nice. Even if the craft session is failed, the script continue. And i also use all random in it, sleep and mouseclick. 3 Craft boxes, within 1½ hour. Were ever i lay my script is my home...
MHz Posted December 16, 2004 Posted December 16, 2004 (edited) @ Doxie Glad you had some success. Cheers Edited December 16, 2004 by MHz
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