cxzzD Posted January 11, 2011 Share Posted January 11, 2011 So yea.. uhm. Started playing around with AutoIt a couple of hours ago and viewed some german tutorials on youtube (Couldn't understand much.. but anyways..). So I figured I was ready to create an auto login script for a game called League of Legends. Everything goes well until I want it to get out of an "while" loop i did. I tried with the Wend command but didn't seem to help at all (Loop just continued..), so I tried with a "ExitLoop" function and that didn't quite work out either. So now im turning to you in hope of a helping hand! Here is the code, It's probably really messy since I have no experience at all with AutoIt, but don't flame to hard on me Constructive criticism is really appreciated tho! Code: HotKeySet("{F6}","Terexit") WinWaitActive("League of Legends Launcher - 1, 0, 0, 31 - [user]") ;Start your lol.exe, this code will log you in. $Start = 1 if $start = 1 Then Sleep(2000) Send("{TAB 11}") Sleep(3500) Send("{Enter}") Sleep(12000) Send("InsertPasswordHere") Sleep(200) Send("{Enter}") $start += 1 endif WinWaitActive("PVP.net Client") ; This is right before bot starts the game. ***** !!!This is the loop that won't stop!!! ***** $startMenu = 1 while $startMenu = 1 $startFind = PixelSearch(321, 142,1597, 937,0x900000) if IsArray($startFind) = True Then MouseMove($startFind[0],$startFind[1],5) sleep(9000) MouseClick("left") EndIf ExitLoop WEnd Sleep(2000) MouseMove(763,453,5) Sleep(1200) MouseClick("left") MsgBox(0,"Howdieehoe","Funka jue") Func terexit() exit 0 EndFunc Thanks in advance Link to comment Share on other sites More sharing options...
JohnOne Posted January 11, 2011 Share Posted January 11, 2011 Ooooh! of to a bad start. Best if you read the announcement at the top of the forum. also there are english language tuts on youtube as well as tuts in the wiki here. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
cxzzD Posted January 11, 2011 Author Share Posted January 11, 2011 (edited) Ooooh! of to a bad start.Best if you read the announcement at the top of the forum.also there are english language tuts on youtube as well as tuts in the wiki here.I just want a simple Login script (Need to practice AutoIt on something now don't I?!)Can't you just give me a answer and I swear to god I will delete the script as soon as I get it working..?Hell, I'll even record doing so if that pleases you Edited January 11, 2011 by xCynic Link to comment Share on other sites More sharing options...
ZacUSNYR Posted January 11, 2011 Share Posted January 11, 2011 http://www.autoitscript.com/forum/forum-9/announcement-12-game-bots-and-automation/ And your problem is not failure to exit the loop, but the script is pausing waiting for a function. Learn autoit another way and people here will offer help. Once you have a clue what you're doing then you can go rogue. People are touchie about game automation here from any aspect (logging in, cheating, etc) Link to comment Share on other sites More sharing options...
JohnOne Posted January 11, 2011 Share Posted January 11, 2011 Laughing at "go rogue" Chortle AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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