Sign in to follow this  
Followers 0
para

Need extreme help with a script for aim.

10 posts in this topic

Hello, I am new to autoit yet have used it before, but off templates for simple things. Mostly in games...

A friend of mine needs a script, I tried and failed. I don't think it would be to hard if the person doing it knows what they are doing.

Here is what I need it to do...

Every time someone uses aol instant messanger to message his account, or multiple accounts, it waits 4 seconds(enough for the away message to kick in), then closes the message box, leaving the away message up and the new message gone.

Aim freezes on him at 140 aims. He runs a buisness and he gets alot! His away message is a link. He needs this to work pretty bad, it fills up real fast.

Heres the run down.

Program that will loop, closing aol instant messanger windows(the kind you use to chat) yet leaving the away message alone.

The problem I ran into is the name of the aim window on the taskbar changes every time due to screen name, but is there a way to use a partial taskbar name?

I would grately appriciate it if someone could write this for me, or at least shoot good pointers at me.

Thanks alot.


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I would say use trillian or some other program that replaces MSN, AIM, and the others all in one program. Trillian seems to work far better and not disconnect. It also offers a few more features.

You could most likely use the classname or partial name of the title.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

He wants to stick with aim. I am not sure how to set it to find the window when it shows up... like... what do i put so that it knows to "detect" the new window?


Share this post


Link to post
Share on other sites

Use window spy to get the name, or classname, ok, say the classname shows up like this:

classname=MozillaWindowClass

Opt("WinTitleMatchMode", 4)    ;advanced
while 1
if winexists("classname=MozillaWindowClass","") then cleanup()
sleep(10)
wend

func cleanup()
 msgbox(1,"Tada","Actually I would have closed it at this point")
endfunc

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

ahh that right there i THINK is exactly what I needed... i will see when i get home in 2 hours.

by the way, can i make it so that when it detects the window, it waits like 2-4 seconds so his away message can respond?


Share this post


Link to post
Share on other sites

Opt("WinTitleMatchMode", 4)   ;advanced
while 1
if winexists("classname=MozillaWindowClass","") then cleanup()
sleep(10)
wend

func cleanup()
sleep(2000); for 2 seconds, before doing whatever you are going to do.
msgbox(1,"Tada","Actually I would have closed it at this point")
endfunc


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Try this... I use aim so this is coming from mine...

Opt("WinTitleMatchMode", 2)
Dim $pause = 5;pause in seconds
Dim $pTitle = ": screenname - Instant Message";Partial Title
$pause = $pause * 1000

While 1
   If WinExists($pTitle) Then 
      WinActivate($pTitle)
      $title = WinGetTitle($pTitle)
      CleanUp($title)
   Sleep(100)
   EndIf
WEnd

Func CleanUp(ByRef $title)
   Sleep($pause)
   WinKill($title)
End Func

I havent tested this as of yet. I will do it when I get back from lunch. If you can test before then please do so.

Edit: Fixed code... (forgot the EndIf)

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

js, yours gives me an error saying that wend will not work with the rest of the code...(weld it said i think?)

skriptkiddie... it seems to work, but what do i change to make it actually close without giving a popup?

thanks a million guys


Share this post


Link to post
Share on other sites

Opt("WinTitleMatchMode", 4)  ;advanced
while 1
if winexists("classname=MozillaWindowClass","") then cleanup()
sleep(10)
wend

func cleanup()
sleep(2000); for 2 seconds, before doing whatever you are going to do.
Winkill("classname=MozillaWindowClass") 
endfunc

Make sure to use your classname of the window and not MozillaWindowClass.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

js, yours gives me an error saying that wend will not work with the rest of the code...(weld it said i think?)

skriptkiddie... it seems to work, but what do i change to make it actually close without giving a popup?

thanks a million guys

<{POST_SNAPBACK}>

Sorry I edited my above code to include the closing if statement I forgot in my rush to get out to lunch :)

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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