kanethekiller Posted March 4, 2004 Posted March 4, 2004 This Is My Script So Far... And I Want The Thing In {} To Loop Forever And If You See Any Other Errors Let Me Know Thanks In Advance $Login = IniRead (@ScriptDir & "\Pit_Script.ini","_Info_", "Login","") $Email = IniRead (@ScriptDir & "\Pit_Script.ini","_Info_", "Email","") $Pass = IniRead (@ScriptDir & "\Pit_Script.ini","_Info_", "Pass","") $Click = IniRead (@ScriptDir & "\Pit_Script.ini", "_Delays_", "Click","") run ("Explorer.exe http://www.alienaa.com","",@SW_MAXIMIZE) Sleep (5000) Winactivate("A3 - Awakening - Microsoft Internet Explorer") Send ("{TAB}") Sleep (2500) Send ("www.alienaa.com") Send("{ENTER}") Sleep (3000) WinsetTitle("A3 - Awakening - Microsoft Internet Explorer","","Pit_Script") Winmove("Pit_Script","", 277,97,831,651) Send ("{TAB}") Sleep (2500) Send ("{TAB}") Send ($Email) Sleep (2000) Send ("{TAB}") Sleep (2000) Send ("{ENTER}") Sleep(3000) Do Sleep($Click) $Side = PixelGetColor (818,604) If $Side = 16382971 Then MouseClick("Left", 817, 612, 1, 40) Sleep($Click) Endif Untill $Side = 16568762 MouseClick("Left", 205, 599, 1, 40) Sleep($Click) MouseClick("Left", 438, 509, 1, 40) Sleep($Click) Do Sleep($Click) $Side = PixelGetColor (818,604) If $Side = 16382971 Then MouseClick("Left", 817, 612, 1, 40) Sleep($Click) Endif Untill $Side = 16568762 MouseClick("Left", 211, 502, 1, 40) Sleep(2500) MouseClick("Left", 277, 331, 1, 40) Sleep($Click) {{{{{{{{{{{{{{{{{{ Mouseclick("Left", 359, 235, 1, 40) Sleep($Click) Do $PixMine = PixelGetcolor (208,279) $PixMine2 = PixelGetColor (206,331) $Pixest = PixelGetColor (370,221) $Pixest2 = PixelGetColor (369,250) If PixMine = 13693136 Then Mouseclick("Left", 208, 279, 1, 40) Sleep($Click) Endif If $PixMine2 = 13693136 Then Mouseclick("Left", 206, 331, 1, 40) Sleep($Click) Endif If $Pixest = 13693136 Then Mouseclick("Left", 370, 221, 1, 40) Sleep($Click) Endif If $Pixest2 = 13693136 Then Mouseclick("Left", 369, 250, 1, 40) Sleep($Click) Endif Until $Pixest = 16777215 Sleep($Click) Do $PixMine = PixelGetcolor (208,279) $PixMine2 = PixelGetColor (206,331) $PixWest = PixelGetColor (333,219) $PixWest2 = PixelGetColor (338,247) If $PixMine = 13693136 Then Mouseclick("Left", 208, 279, 1, 40) Sleep($Click) Endif If $PixMine2 = 13693136 Then Mouseclick("Left", 206, 331, 1, 40) Sleep($Click) Endif If $PixWest = 13693136 Then Mouseclick("Left", 333, 219, 1, 40) Sleep($Click) Endif If $PixWest2 = 13693136 Then Mouseclick("Left", 338, 247, 1, 40) Sleep($Click) Endif Until $PixWest = 16777215 Sleep($Click) Do $PixNorth = PixelGetColor (353,207) If $PixNorth = 1677215 Then Mouseclick("Left" 370, 221, 1, 40) Sleep($Click) Endif Until $PixNorth = 13693136 Sleep($Click) Mouseclick("Left", 353, 207, 1, 40) Sleep($Click) $Stair = PixelGetColor (170,280) $Stair2 = PixelGetColor (170,332) If $Stair = 13693136 Then Mouseclick("Left", 170, 280, 1, 40) Sleep($Click) Endif If $Stair2 = 13693136 Then Mouseclick("Left", 170, 332, 1, 40) Sleep($Click) Endif MouseClick("Left", 357, 220, 1, 40) Sleep($Click) MouseClick("Left", 180, 280, 1, 40) Sleep($Click) MouseClick("Left", 360, 220, 1, 40) Sleep($Click) }}}}}}}}}}}}}}}
Wallfire Posted March 4, 2004 Posted March 4, 2004 (edited) is it not working as in not looping forever? or giving some error? EDIT: whats with the DO commmands, what do they do? woot! im a member still a newb at heart tho... Edited March 4, 2004 by Wallfire :cheer: awww...wheres the chick?
kanethekiller Posted March 4, 2004 Author Posted March 4, 2004 Giving The Error Line 137 Wend ; No Do Statment To Match The Until
Wallfire Posted March 4, 2004 Posted March 4, 2004 the ending command of a while loop is: WEnd (W+End) caps are important. i guess i have never used Do loops, ill look into those. :cheer: awww...wheres the chick?
kanethekiller Posted March 4, 2004 Author Posted March 4, 2004 Changed The Wend To WEnd Still The Same Error
Wallfire Posted March 4, 2004 Posted March 4, 2004 (edited) dunno what to tell ya, try debugging it. can it run just once? if not try isolating sections of code untill you find where the error is coming from. you also might find it useful to TAB out your lines of code anytime you have a loopand then TAB back once the loop finishes. that way you can tell if you have any open loops. like this: IF $x=1 Then ;Do the stuff here, tabed out. If $y=1 Then ;More stuff tabed more Next Next;come back to the base line see if that helps, my guess is yo have a DO loop no finishings somewhere Edited March 4, 2004 by Wallfire :cheer: awww...wheres the chick?
kanethekiller Posted March 4, 2004 Author Posted March 4, 2004 Odd, It Gives The Error About The Last Line... Evertime..
Wallfire Posted March 4, 2004 Posted March 4, 2004 (edited) hey lar, how did you do that? i suppose you are using some sort of code writer that auto indents for you?im using notepad and as my code project is allready 200+ lines long things are getting messy! also, with notepad every now and then it starts saving my work as name.au3.txt which wont run. why does it do this? and anyway to get it to stop?and can i find a free-ware code writer that has auoit functions pre-defined so that it will know how to auto indent and such? EDIT:Odd, It Gives The Error About The Last Line... Evertime..thats bc you got a hanging loop somewhere, gets to the end and expects to find a closing loop command.lol, what does she spell?-> Edited March 4, 2004 by Wallfire :cheer: awww...wheres the chick?
GrahamS Posted March 4, 2004 Posted March 4, 2004 Try Tidy Your Script File, with another script GrahamS
trids Posted March 5, 2004 Posted March 5, 2004 hey lar, how did you do that? i suppose you are using some sort of code writer that auto indents for you?.. it's also a matter of discipline: try indenting as you code .. Does wonders for the soul
CyberSlug Posted March 5, 2004 Posted March 5, 2004 See this thread about text editors. Crimson, SciTE, and TextPad are a few good editors to check out. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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