Sign in to follow this  
Followers 0
xXUlTiMaTeSiNXx

MSN autosend file.

15 posts in this topic

Heya guys, well im new to this forum (Yay for my first post) and im just starting to learn AutoIT, but i am trying to write a program to autosend a file over msn, and i was wondering how to make it winwait for a msn convo as the window title is always different for every convo as the screen name is displayed in the window title, in batch it would be something like "MSN convo - *" but ovcorse this isnt batch, so how to go about this?


I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I don't use MSN , but I do use trillian.

I would imagine SOMETHING in the titles are the same... Anything that isn't common is windows other than MSN.

You could use StringInStr and other string functions to get your desired effect ( helpfile rocks ) , and use WinWait to followup on it.

Side Tip: I believe you can customize your idle message in the preferences :D.

Edited by Drew

Share this post


Link to post
Share on other sites

You could use StringInStr and other string functions to get your desired effect ( helpfile rocks ) , and use WinWait to followup on it.

sorry, like i say i am new, what is StringInStr? (sorry, i would look in the help file but i am curently on my linux partition)

and yes, the start part of it is alwase the same, its something like "Msn conversation - **SCREEN NAME**"


I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites

bump.


I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites

So i would use this to find the first part of the msn conversation window title? but what about the second part? could someone please write an example of the code so i understand?


I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites

Is the idea to have MSN messenger wait for someone to send a message to it then auto-send a file back to that person? The person/screen name that is sending the message is going to be the same every time, a group of several known screen names, or completely random unknown names? There are several different functions you can use and different ways to go about it depending on your specific purpose. The link I gave you had an example of how to use StringInStr....2 examples.

Share this post


Link to post
Share on other sites

Is the idea to have MSN messenger wait for someone to send a message to it then auto-send a file back to that person? The person/screen name that is sending the message is going to be the same every time, a group of several known screen names, or completely random unknown names? There are several different functions you can use and different ways to go about it depending on your specific purpose. The link I gave you had an example of how to use StringInStr....2 examples.

basicly heres how it should work

IF

*msn conversation is open & msn name = ANY

SEND

*file.exe


I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I don't have access to MSN messenger at the moment, but I checked some screenshots. The following might work:

Opt("WinTitleMatchMode", 2)     ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
;MSN Messenger window title format: "screenname - Conversation"
;Following might activate the most recent MSN conversion window
$convo = WinActivate("Conversation")

Edit: Have you searched the forum yet? I think this has already been done, several times...

Edited by MrMitchell

Share this post


Link to post
Share on other sites

I don't have access to MSN messenger at the moment, but I checked some screenshots. The following might work:

Opt("WinTitleMatchMode", 2)     ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
;MSN Messenger window title format: "screenname - Conversation"
;Following might activate the most recent MSN conversion window
$convo = WinActivate("Conversation")

Edit: Have you searched the forum yet? I think this has already been done, several times...

so theoreticly this will wait for a convo with random screen name to open?

I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites

so theoreticly this will wait for a convo with random screen name to open?

It should activate the last window that had focus if it has the word "Conversation" in the title, but not wait for it.

This may wait for the window to be active after trying to activate it:

WinWaitActive("Conversation")

Share this post


Link to post
Share on other sites

It should activate the last window that had focus if it has the word "Conversation" in the title, but not wait for it.

This may wait for the window to be active after trying to activate it:

WinWaitActive("Conversation")

so then theoreticly i should use;

WinWaitActive("Conversation")
Opt("WinTitleMatchMode", 2)     ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
$convo = WinActivate("Conversation")

and then put my script for sending the file?


I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites

so then theoreticly i should use;

WinWaitActive("Conversation")
Opt("WinTitleMatchMode", 2)     ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
$convo = WinActivate("Conversation")oÝ÷ ٩ݶ§¦ëfÊÇ+_¢»Ø§Ø^~)^þ«¨µãh¦ëmå¢f¢´-÷~׫¶¨¶«·
%w¬[(­é¨½çtߧ(ú

So this *should*:

1) Change WinTitleMatchMode options to search by substring of window title

2) Attempt to activate the last focused window with "Conversation" in the title <--This is actually optional

3) Wait until the window is active

Share this post


Link to post
Share on other sites

awasum, thanks man! this will save me alot of time writing my script.


I'm new to AutoIT, please help me where you can.[size=10]Profanity is the one language that all programmers understand[/size]

Share this post


Link to post
Share on other sites

No problem. I am not sure if it will even work, but I can check later tonight and will post again. You really should do a forum search, MSN messenger is all over the place.

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