Jon310 Posted July 18, 2007 Share Posted July 18, 2007 The code below is selecting a random word and entering it over and over again. I would like it to enter a different random word every time it loops. Currently the only way I can get it to select a different word is to have it shell execute itself and shut it down. Is there any way to have it select a different loop each time it loops? (I searched all over the forums and looked through the help file) Thanks in advance, sleep(1000) while 1 $rand_in = IniRead("words.ini", "Words", "key", "NotFound") $rand_list = StringSplit($rand_in, "|") $words = Random (1, $rand_list[0], 1) $words1 = $rand_list[$words] while PixelGetColor(848,472) <> 0x763300 call("guess") WEnd WEnd Func guess() Send($words1) Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{SPACE}") sleep(500) ShellExecute("start.exe") sleep(1000) Exit EndFunc Link to comment Share on other sites More sharing options...
DW1 Posted July 18, 2007 Share Posted July 18, 2007 if you want that then why make it a random word, why not just go through the list from beginning to end? This isn't what it looks like is it? (brute forcer)??? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Jon310 Posted July 18, 2007 Author Share Posted July 18, 2007 if you want that then why make it a random word, why not just go through the list from beginning to end? This isn't what it looks like is it? (brute forcer)???No, nothing malicious,Just messing around with a flash word game. Scrabble type game, uses a maximum of 19 letters going to see if I can automate it.A list wouldnt be bad, going to have to look into that thanks. Link to comment Share on other sites More sharing options...
Siao Posted July 18, 2007 Share Posted July 18, 2007 (edited) For starters, change while PixelGetColor(848,472) <> 0x763300 call("guess") WEnd to If PixelGetColor(848,472) <> 0x763300 Then guess() Edited July 18, 2007 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
Jon310 Posted July 18, 2007 Author Share Posted July 18, 2007 For starters, change while PixelGetColor(848,472) <> 0x763300 call("guess")WEndtoIf PixelGetColor(848,472) <> 0x763300 Then guess()Thanks, was wondering why it was calling my function regardless of what screen it was on. Also. I looked around at just going down a list of words, couldnt find anything. Can anyone point me in a good direction to read about it? 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