Sign in to follow this  
Followers 0
wakummaci

Randomising something

12 posts in this topic

Hi guys!

I'm trying to make an auto replier kind of thingy, and I've got stuck in the part where I want my 'bot' or whatever, to send RANDOM messages back to the client.

I'm storing 20 messages (example) in 20 variables.

I wan't a Send function to send a variable from 1-20 randomly.

I know that there is a random function in autoit, but I can not randomise a variable's name.

If I do it like "Send ($ Random (1 , 20 , 1) ) It says badly defined variable.

What should I do guys?

Plz help me out.

Share this post


Link to post
Share on other sites



Simply put the answers into an array Dim $answer[20] and then

$random=random(20)

send($answer[$random])

Share this post


Link to post
Share on other sites

Hi guys!

I'm trying to make an auto replier kind of thingy, and I've got stuck in the part where I want my 'bot' or whatever, to send RANDOM messages back to the client.

I'm storing 20 messages (example) in 20 variables.

I wan't a Send function to send a variable from 1-20 randomly.

I know that there is a random function in autoit, but I can not randomise a variable's name.

If I do it like "Send ($ Random (1 , 20 , 1) ) It says badly defined variable.

What should I do guys?

Plz help me out.

Tried this one and this seems to work very well, thank you a lot.

Also thanks to zedna for his anwser

Share this post


Link to post
Share on other sites

uhmmm... you are quoting your self.

Funny, I was imagining Zedna as a femail. Ah, well


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Hey I'm man really :-)

I know my nick sound strange in English but in Czech it sound good trust me :-)

I don't know... you could be lying.

I'm reading you as "thirsty woman".


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Hey I'm man really :-)

I know my nick sound strange in English but in Czech it sound good trust me :-)

I don't know... the avatar makes me think of pollen with curlers in its hair...

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

...yeah, like the duck said


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

...yeah, like the duck said

That's "Rakishly handsome, slightly portly duck", thank you very much...

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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