Sign in to follow this  
Followers 0
random667

yahoo chat?

9 posts in this topic

i am new to autoit,

i would like to build a script that can read from the chat window and respond to what the other chatters are saying.

any suggestions on where to start, or how i should go about this?

thanks


It is really sad to see a family torn apart by something as simple as a pack of wolves.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

depending on what you want..

a generic response? very simple to do.

something that can read... interperate... and respond to a message....

very complicated artificial intelligence..

simple example...

opt("wintitlematchmode",2)

while 1

sleep(100)

if winexists (-instant message) then

send("hello, i chose not to set an away message, but instead made a program to do it for me")

endif

wend

as for a chatroom.....

even more complicated.

there are some bots already made that can do some of the things you want probably

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

so this is for messenger? instant messages?

well.. if you want to be doing other things while the program is running, it will be a little more complicated.

but..

if you just want something simple and effective... and dont mind that while its running you cant touch the keyboard.. (just make a pause function with a hotkey)

then do something like

while 1

opt ("wintitlematchmode",2)

if winexists ("-instant message") then

mouseclickdrag ("left",xxx,xxx,xxx,xxx,1,0) ;or however that command is written

;this would be to highlight the text

send(^C)

$myvariable = clipget()

stringtrimleft($myvariable) ;basically, get rid of the screenname. look for whatever it uses at the end of it.. like > or : and trim up to that point.

mouseclick("left") ;back to the message field

if $myvariable = "what" then

send("huh")

endif

and so on...

you could get really fancy... but basically.. you would need a few examples of what..

like

wut

what

what?

wha

wha?

otherwise it will only respond to an exact phrase..

you could do stringinstr and check for an instance of "what" but then you might send a response that youi dont want.. since it could be anything and not what you expected them to mean when they typed that word.

woah..

i mean.. its pretty deep... theres no way you could make a perfect program of this type. just a really good one.

but you can confuse any one of them.. none are perfect.

there are already some bots on yahoo that will attempt a conversation lol..

easy to spot.

hope this helps

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

nevermind it works if i shorten the title in the script to "random667"

how would i get it to break up all this chat and deal with it line by line as it comes in?

Edited by random667

It is really sad to see a family torn apart by something as simple as a pack of wolves.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

look in the help file for the filewrite command.

then.. look at fileread.

by the way.. using wintitlematchmode 2 will make it so you dont need to type the entire title of that window.

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

So, now i just need some help with how to compare the incoming text to a list of predefined key phrases.

i think i will need to use this code for that:

StringInStr ( "string", "substring" [, casesense [, occurance]] )

<{POST_SNAPBACK}>

Yep, but you have to know that nobody ever succeeded to make a bot having a chat like human. There is a competition each year; the winner is a chat bot that people vote "human" instead of "bot" when talking to (they don't know if they're chatting with human or bot). Nobody has won yet...

It's really hard to make something realistic, the context of keywords can change so the answer can be totally absurd (if seeking string "mother", could be "i love my mother", or "you motherfucker", so the answer is supposed to change =)

Hope my english is good enough to be understood...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

YEA, I KNOW.

I'M NOT TRYING TO FOOL PEOPLE INTO THINKING ITS A PERSON.

ITS JUST FOR SOME FUN AND AMUSEMENT FOR MYSELF,

PLUS I'M TRYING LEARN THE AUTOIT SCRIPTING LANGUAGE.

I WILL PROBABLY USE KEY PHRASES INSTEAD OF KEYWORDS

Sorry i didnt realize i had hit caps lock

Edited by random667

It is really sad to see a family torn apart by something as simple as a pack of wolves.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

C'mon, this should be easy:

if $i=1 , how do i combine the text "$T" with the variable $i to give the value of the variable $T1

ive tried "$"&"T"&$i and nearly a dozen other ways.

anyone?

Edited by random667

It is really sad to see a family torn apart by something as simple as a pack of wolves.

Share this post


Link to post
Share on other sites

C'mon, this should be easy:

if $i=1 , how do i combine the text "$T" with the variable $i to give the value of the variable $T1

ive tried "$"&"T"&$i and nearly a dozen other ways.

anyone?

<{POST_SNAPBACK}>

I think you're trying to do something along these lines?

Dim $T[10]

For $i=0 to 9
  $T[$i] = "Phrase " & $i
next

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