Jump to content

Yahoo! chat bot


 Share

Recommended Posts

Ok guys, my problem is when i click on my button (Check Users), i want it to update a list of ALL the open yahoo messenger chat boxes....

heres the code:

#include <GUIConstants.au3>
Opt("WinTitleMatchMode", 2)

$a = 0

$MainGUI = GUICreate("Yahoo Chat Bot", 500, 300)

$Do1 = GUICtrlCreateButton("Check Users", 5, 5, 130, 20)
$CloseChat = GUICtrlCreateButton("Close All Chat Boxes", 5, 30, 130, 20)
$Counter = GUICtrlCreateInput("0 Window(s)", 310, 5, 100, 20, $WS_DISABLED)
$ClearCount = GUICtrlCreateButton("Clear Counter", 420, 5, 75, 20)
$Users = GUICtrlCreateList("", 100, 60, 200, 150)

GUICtrlCreateLabel("This Bot Has Closed:", 200, 8)

GUISetState()

While 1
   
   $msg = GUIGetMsg()
   
   If $msg = -3 Then
      Exit
   EndIf
   
   If $msg = $Do1 Then
      Do
         $Title = WinGetTitle(" - Instant Message")
         ClipPut(StringTrimRight($Title, 18))
         WinSetState($Title, "", @SW_MINIMIZE)
         GUICtrlSetData($Users, ClipGet() & @CRLF)
      Until WinActive(" - Instant Message") = 0
   EndIf
   
   If $msg = $CloseChat Then
      Do
         WinClose(" - Instant Message")
         $a = $a + 1
         
      Until WinExists(" - Instant Message") = 0
      GUICtrlSetData($Counter, $a & " Window(s)")
   EndIf
   
   If $msg = $ClearCount Then
      $a = 0
      GUICtrlSetData($Counter, "0 Window(s)")
   EndIf
   
WEnd

Any ideas?

Crome

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...