Jump to content

Recommended Posts

Posted

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

Posted (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? :o

~cdkid

-edit

type-o

Edited 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!
Posted (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 by Jasio
Posted

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 :o

~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!
Posted

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

Posted (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 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!
Posted

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!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...