kapowdude Posted February 18, 2005 Share Posted February 18, 2005 (edited) hey im trying to make my own bot that recives messages from an instant message then eventually the person will commmand the bot to do something... but first i'm having problems to detect if some one has imed me... While 1 WinExists(": - Instant Message") WEnd If WinExists(": - Instant Message") then WinActivate(": - Instant Message") Send("welcom %n, checking username") it doesnt seem to be working for me. Im trying to get it so it detects if someone has imed the bot... and the bot will reply to the message. Edited February 18, 2005 by kapowdude Link to comment Share on other sites More sharing options...
CyberSlug Posted February 18, 2005 Share Posted February 18, 2005 Won't work: While 1 WinExists(": - Instant Message") WEnd Might work:Opt("WinTitleMatchMode", 2) ;match any part of title $partialTitle = " - Instant Message" While 1 sleep(10);prevent maxing out the CPU WinWait($partialTitle);WAIT FOR WINDOW TO APPEAR $fullTitle = WinGetTitle($partialTitle) WinActivate($fullTitle) Send("welcome %n, checking username") ;change title so that WinWait will not keep matching the same window!! $newTitle = StringReplace($fullTitle, "Instant Message", "Instant Msg") WinSetTitle($fullTitle, "", $newTitle) WEnd Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
kapowdude Posted February 18, 2005 Author Share Posted February 18, 2005 Won't work:While 1 WinExists(": - Instant Message") WEndMight work:Opt("WinTitleMatchMode", 2);match any part of title $partialTitle = " - Instant Message" While 1 sleep(10);prevent maxing out the CPU WinWait($partialTitle);WAIT FOR WINDOW TO APPEAR $fullTitle = WinGetTitle($partialTitle) WinActivate($fullTitle) Send("welcome %n, checking username") ;change title so that WinWait will not keep matching the same window!! $newTitle = StringReplace($fullTitle, "Instant Message", "Instant Msg") WinSetTitle($fullTitle, "", $newTitle) WEnd<{POST_SNAPBACK}>thanks i see what i did wrong now... thanks alot Link to comment Share on other sites More sharing options...
charlestown4 Posted February 21, 2005 Share Posted February 21, 2005 Hey, cool idea! I like it and am currently useing/changing to my likings. One question though, how do I get it to write the messages into an .ini file that I can later read and respond to? 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