Jump to content

AIM Bot


 Share

Recommended Posts

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
Link to comment
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!
Link to comment
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
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...