ktvegas Posted March 9, 2005 Share Posted March 9, 2005 Hi guys, I am trying to write a script that will detect when someone sends me a message through msn messenger. I will use the name "Gary" as an example. When a message is received, a window is created with the title "Gary - Conversation" My concern is not with the script itself - its just with the handling of the windows right now - this works (doesn't do anything except Activate and then close the window - but thats all I wanted) Can I somehow make this for ANY window that ENDS in "- Conversation" (so not just for Gary -- but for anyone who sent a message) While 1=1 WinActivate("Gary - Conversation") Send ("Test") WinClose("Gary - Conversation") Sleep(2000) Wend Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 9, 2005 Share Posted March 9, 2005 (edited) Hi guys,I am trying to write a script that will detect when someone sends me a message through msn messenger. I will use the name "Gary" as an example.When a message is received, a window is created with the title"Gary - Conversation"My concern is not with the script itself - its just with the handling of the windowsright now - this works (doesn't do anything except Activate and then close the window - but thats all I wanted)Can I somehow make this for ANY window that ENDS in "- Conversation" (so not just for Gary -- but for anyone who sent a message)While 1=1WinActivate("Gary - Conversation")Send ("Test")WinClose("Gary - Conversation")Sleep(2000)Wend<{POST_SNAPBACK}>Opt("WinTitleMatchMode",2) WinExists("- Conversation") $title_convo = WinGetTitle("- Conversation") While 1 WinActivate($title_convo) Send("Test!S",0); !S is Alt+S or the default send function on most chatters WinClose($title_convo) Sleep(2000) WEndand wrap your code in [.code] [./code] (no period). It makes it easier to identify and read. It also keeps any formatting you put in. Edited March 9, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now