wakummaci Posted October 21, 2008 Share Posted October 21, 2008 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. Link to comment Share on other sites More sharing options...
ds34 Posted October 21, 2008 Share Posted October 21, 2008 Simply put the answers into an array Dim $answer[20] and then $random=random(20) send($answer[$random]) Link to comment Share on other sites More sharing options...
Zedna Posted October 21, 2008 Share Posted October 21, 2008 Send (Eval("$" & Random (1 , 20 , 1))) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
wakummaci Posted October 21, 2008 Author Share Posted October 21, 2008 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 Link to comment Share on other sites More sharing options...
trancexx Posted October 21, 2008 Share Posted October 21, 2008 uhmmm... you are quoting your self. Funny, I was imagining Zedna as a femail. Ah, well ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Zedna Posted October 23, 2008 Share Posted October 23, 2008 Funny, I was imagining Zedna as a femail. Ah, wellHey I'm man really :-)I know my nick sound strange in English but in Czech it sound good trust me :-) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
trancexx Posted October 24, 2008 Share Posted October 24, 2008 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 24, 2008 Share Posted October 24, 2008 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... 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 Link to comment Share on other sites More sharing options...
Zedna Posted October 24, 2008 Share Posted October 24, 2008 I don't know... the avatar makes me think of pollen with curlers in its hair... My avatar is abstract organism. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 24, 2008 Share Posted October 24, 2008 My avatar is abstract organism....with curlers in its hair! 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 Link to comment Share on other sites More sharing options...
trancexx Posted October 24, 2008 Share Posted October 24, 2008 ...yeah, like the duck said ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 25, 2008 Share Posted October 25, 2008 ...yeah, like the duck saidThat's "Rakishly handsome, slightly portly duck", thank you very much... 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 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