Sign in to follow this  
Followers 0
kapowdude

AIM Bot

4 posts in this topic

#1 ·  Posted (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 by kapowdude

Share this post


Link to post
Share on other sites



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!

Share this post


Link to post
Share on other sites

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

<{POST_SNAPBACK}>

thanks i see what i did wrong now... thanks alot

Share this post


Link to post
Share on other sites

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?

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