Jasio Posted February 14, 2006 Share Posted February 14, 2006 I was curious.. is it possible to give the program 5 different things to say .. IE: Hi, hey, hello, whats up And have it pick one randomly, and type it.. Thanks, Jasio Link to comment Share on other sites More sharing options...
cdkid Posted February 14, 2006 Share Posted February 14, 2006 (edited) sure...dim $words[4] $words[0] = "hi" $words[1] = "hey" $words[2] = "what's up" $words[3] = "hello" $var = Random(0, 3, 1) send($words[$var])when this is run it will send the keys "hi", "hey", "what's up", or "hello"somethin like that? ~cdkid-edittype-o Edited February 14, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Jasio Posted February 14, 2006 Author Share Posted February 14, 2006 (edited) That seems like it would work, question though, will it run forever? Also, i dont want it to random when run, i want it to random every 30 seconds.. Edited February 14, 2006 by Jasio Link to comment Share on other sites More sharing options...
cdkid Posted February 14, 2006 Share Posted February 14, 2006 umm well dim $words[4] $words[0] = "hi" $words[1] = "hey" $words[2] = "what's up" $words[3] = "hello" While 1 sleep(30 * 1000) $var = Random(0, 3, 1) send($words[$var]) WEnd that'll run for ever and every thirty seconds it will send a one of the messages --i think ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Jasio Posted February 14, 2006 Author Share Posted February 14, 2006 Ok, one more question. How do i have it do something after each message was said.. so ive said "hey hello hi whats up" now i want to "do this" and repeat the hey whats up hello hi.. randomly Link to comment Share on other sites More sharing options...
cdkid Posted February 15, 2006 Share Posted February 15, 2006 (edited) umm let's see if i can take a stab at what ur tryin to do dim $words[2] $words[0] = "hi" $words[1] = "hey" While 1 $rnd = Random(0, 1, 1) select case $0s = 0 AND $rnd = 0 $0s = 1 send($words[0]) case $1s = 0 AND $rnd = 1 $1s = 1 send($words[1]) endselect if $0s = 1 AND $1s = 1 then ;DO STUFF HERE $0s = 0 $1s = 0 endif sleep(100) WEnd hope this helps ~cdkid WEnd Edited February 15, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Jasio Posted February 15, 2006 Author Share Posted February 15, 2006 i really.. didnt understand that.. mind if i PM you the code and you set it up? =/ Thanks, Jasio Link to comment Share on other sites More sharing options...
cdkid Posted February 15, 2006 Share Posted February 15, 2006 i spose. AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! 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