Sign in to follow this  
Followers 0
Jon310

Help with Random

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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)???

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

For starters, change

while PixelGetColor(848,472) <> 0x763300

call("guess")

WEnd

to

If PixelGetColor(848,472) <> 0x763300 Then guess()

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

For starters, change

while PixelGetColor(848,472) <> 0x763300

call("guess")

WEnd

to

If 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?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0