Jump to content

Aim Window Closer


para
 Share

Recommended Posts

I made a script to close aim windows when I am away for a while.

Somtimes aim(aol instant messanger) will freeze around 130-150 instant message windows. If I or friends are away for long enough, it gets that high and freezes. I made this so that I can stay online, and be able to check my logs to see what people said, but close instant message windows as they open.

I put my away message up and unhide messages.

When someone messages me, the autoit script will close the window after 2 seconds, giving it enough time for my away message to kick in.

SplashTextOn ( 'AIM Message Closer V1.0 - Para', 'AIM Message Closer V1.0 created by **** (******@****.***)', 200, 120,0,0 )

Do
AutoItSetOption ( "WinTitleMatchMode", 4 )
If WinExists("classname=AIM_IMessage") Then
  Sleep ( 2000 )
WinKill("classname=AIM_IMessage", "")
EndIf
Until WinExists ("FillerFiller123321123")

I made the Until WinExists ("FillerFiller123321123") part so that it will not close, i did not know how to loop it so that works fine.

-What I am asking is for is any help that anyone can give me making it so that it counts how many IM'S have been closed.

That way when coming back to the computer, it shows in the "SpashText" how many ims have been recieved and closed.

I would like to be able to stick it right under the rest of the text in there, the astriks are for my e-mail and name by the way.

If anyone can help me so that the script shows the amount of IMS recieved that would be great!

Thanks alot!

-para

Link to comment
Share on other sites

  • Developers

untested:

$counter = 0
$Title = 'AIM Message Closer V1.0 - Para'
$Msg = 'AIM Message Closer V1.0 created by **** (******@****.***)'
SplashTextOn($Title, $Msg, 200, 120, 0, 0)
Do
   AutoItSetOption("WinTitleMatchMode", 4)
   If WinExists("classname=AIM_IMessage") Then
      Sleep(2000)
      WinKill("classname=AIM_IMessage", "")
      $counter = $counter = 1
      ControlSetText($Title, "", "Static1", $Msg & @LF & "Message closed:" & $counter)
   EndIf
Until WinExists("FillerFiller123321123")

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I figured out ur mistake, thank u so much for the help

$counter = 0

$Title = 'AIM Message Closer V1.0 - Para'

$Msg = 'AIM Message Closer V1.0 created by Para (xparax@gmail.com)'

SplashTextOn($Title, $Msg, 200, 120, 0, 0)

Do

AutoItSetOption("WinTitleMatchMode", 4)

If WinExists("classname=AIM_IMessage") Then

Sleep(2000)

WinKill("classname=AIM_IMessage", "")

$counter = $counter + 1

ControlSetText($Title, "", "Static1", $Msg & @LF & "-------------------------------- Messages Closed: " & $counter)

EndIf

Until WinExists("FillerFiller123321123")

you forgot to make it + 1 instead of just 1... thanks alot!

Link to comment
Share on other sites

  • Developers

Good format, but it doesn't add them up... stays at 0 =[

thanks for tryin to help, i appriciate it, anyone got any ideas to make this work?

<{POST_SNAPBACK}>

Oops...typo ...

$counter = $counter = 1 is ofcourse wrong

must be: $counter = $counter + 1

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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