Jump to content

MSN Bot


Recommended Posts

Hello,

I was wondering if it's already possible to make an MSNBot in AutoIt, because I just read somewhere on the forum that someone was planning to make a MSN UDF, or it's already done, because I read that some months ago.

Thanks,

PcExpert

Link to comment
Share on other sites

You might want to take a look at This


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Thanks, the thing I tried is this:

Opt("WinTitleMatchMode", 2)

WinWaitActive(" - Gesprek")

Sleep(1000)

send("Hello {ENTER}")

But for me it was quite difficult to find out when the user types something back. I installed MSN Plus so I can give the users custom names. I've done that. But now I've still got one problem: Howto know when to read the conversation history file. The filename is not difficult. Only WHEN to read it. Does somebosy have an idea for that?

Link to comment
Share on other sites

but is there a chance that theres a log chat option

By default, this option is enabled.

The logs are found at:

C:\Documents And Settings\<Username>\My Documents\My Recieved Files\

Then go to the folder that starts with the first portion of your Windows Live! Passport. For example my passport is nfwu@xxxxxxx.com (replace the x's with hotmail), and my folder is called nfwu888931311.

In that folder, you'll see another folder called history. Open it.

There you will find the logs. For example, when I chat with Chris, the log file is called chris95219506119844.xml

Enjoy!

#)

Link to comment
Share on other sites

Thanks, but how does the Bot know then he has to read the history? If I use Windows Messenger I can get the text that is typed by the user with the window info tool. But Ican't do it like that way with Windows Live Messenger or MSN Messenger.

Link to comment
Share on other sites

  • Moderators

Try communicating directly using the MSN Messenger protocol instead then.

#)

Like he knows what your talking about :D

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Hi all!

I have fixed the the first reply. This is the code:

Opt("WinTitleMatchMode", 2)

While 1
If WinExists(" - Gesprek") Then
ControlSend(" - Gesprek", "", 1, "hey, hoe gaat het? {ENTER}")
WinClose(" - Gesprek")
EndIf
WEnd
 oÝ÷ Ø­"¶k¬¶·vØ^­êeÉúèØ^ºÇ«Ju׶¬r^jëh×6WinWait(" - Gesprek")
WinActivate(" - Gesprek")
$txt = WinGetText(" - Gesprek")
If $txt = "goed" Then
ControlSend(" - Gesprek", "", 1, "OK, das mooi! {ENTER}")
WinClose(" - Gesprek")
Else
ControlSend(" - Gesprek", "", 1, "Oow, das jammer {ENTER}")
WinClose(" - Gesprek")
EndIf

But the reply part (the second part) doesn't work, if the users says "goed" then it reply's with this: Hey, hoe gaat het?. What's wrong?

Edited by PcExpert
Link to comment
Share on other sites

because you put the winwait in a loop and never added an exitloop, (autoit doesnt support multi threading) and you cant do more then 1 thing at once, unless you made a loop and put multiple functions in it i think thats one way, plus your searching for the same window to be active thats going to be a lil hard to do unless you go about getting the amount of control ID's on the page and then see if there are that many.

maybe? using ur code itll just wait for it then send the whose there then close the window, then call the thing and wait for the window to exist(the person to reply)

Opt("WinTitleMatchMode", 2)
While 1
    If WinExists(" - Gesprek") Then
        ControlSend(" - Gesprek", "", 1, "hey, hoe gaat het? {ENTER}")
        WinClose(" - Gesprek")
        Message()
    EndIf
WEnd
Func Message()
WinWait(" - Gesprek")
WinActivate(" - Gesprek")
If WinGetText(" - Gesprek") = "goed" Then
ControlSend(" - Gesprek", "", 1, "OK, das mooi! {ENTER}"); it has a control id of x)?
WinClose(" - Gesprek")
Else
ControlSend(" - Gesprek", "", 1, "Oow, das jammer {ENTER}")
WinClose(" - Gesprek")
EndIf
Endfunc
Link to comment
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
 Share

  • Recently Browsing   0 members

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