Sign in to follow this  
Followers 0
XZ3R0

Random words

3 posts in this topic

I want to make a thing that will randomly type words from list. I made an array with a set of 5 words. And tried to put the array into random, but it only types "0". how could i make it randomly selecet a word and type it. and if possible be able to type a random amount from the list all at once.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Sec lemme write this up quickly for you, Will edit this post in 5-10

$Word = ""
RandomWord()
Func RandomWord()
$Word = Random ( 1, 5 ,1 )
PrintWord()
EndFunc

Func PrintWord()
If $Word = "1" Then
    Send("WORD1")
EndIf
EndFunc

In theory this should work, i dunno though sorry

If $Word = "1" Then
    Send("WORD1")
EndIf
EndFu

this is unfinIshed you need to changed $Wod = "1" to $Word = "2"

I Think you'll get it if u Read it :P

Edited by Maxisking

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

from what i'm seeing it only seems like its going to type a 1 selected word, 1 out of 5 times.

what i want is:

i have 5 words in a list. words: a, b, c ,d ,e

i want it to randomly type 1 word from that list. and then if possible (probably a later function that ill imply) a random amount/combination of more then 1 of those.

edit: oh wait i think i get it. but i think you want me to write a whole new "if...then" statement per word. i think there's an easier way. i intened to increase this list to possibly 100 or more. needs to be a little easier.

edit:edit: heres what i got

Func RandomWord()
$Word = Random ( 1, 5 ,1 )
send ($words[$Word])
EndFunc

thanks for the inspiration though. im using an array ($words) to store my list. so this will allow me to only have to do 2 steps, and words to the array and then increase the random max integer.

now only to add function to put multiple words together

Edited by XZ3R0

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