PcExpert Posted June 24, 2006 Posted June 24, 2006 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
Moderators SmOke_N Posted June 24, 2006 Moderators Posted June 24, 2006 http://www.autoitscript.com/forum/index.ph...ode=adv&f=2 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.
BigDod Posted June 24, 2006 Posted June 24, 2006 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
PcExpert Posted June 24, 2006 Author Posted June 24, 2006 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?
PcExpert Posted June 24, 2006 Author Posted June 24, 2006 For now the bot only works with Windows Messenger, because I can't figure out how to read the text when using MSN Messenger 7.5.
Thatsgreat2345 Posted June 24, 2006 Posted June 24, 2006 i dont use MSN and i hate MSN messenger , but is there a chance that theres a log chat option, and i think MSN uses well TCP of course so im sure you can use those to monitor it and check for incoming packets, and yeah thats if you know how to do that stuff
lopolop Posted June 24, 2006 Posted June 24, 2006 just out of curiosity can autoit send and recive packets?
w0uter Posted June 25, 2006 Posted June 25, 2006 yes. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
nfwu Posted June 25, 2006 Posted June 25, 2006 but is there a chance that theres a log chat optionBy 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.xmlEnjoy!#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
PcExpert Posted June 25, 2006 Author Posted June 25, 2006 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.
nfwu Posted June 25, 2006 Posted June 25, 2006 Try communicating directly using the MSN Messenger protocol instead then. #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
Moderators SmOke_N Posted June 25, 2006 Moderators Posted June 25, 2006 Try communicating directly using the MSN Messenger protocol instead then.#)Like he knows what your talking about 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.
PcExpert Posted June 25, 2006 Author Posted June 25, 2006 (edited) 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 June 25, 2006 by PcExpert
Thatsgreat2345 Posted June 25, 2006 Posted June 25, 2006 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
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