Auto It - Apply News Message Rules

A

Anthony Giorgianni

Hello All

I don't know if this would be useful to anyone else, but I thought I'd post
it.

Given the ridiculous number of steps Outlook Express puts you through to
create and then apply message rules, I made an Auto-It script to apply NEWS
rules to entire folder "Outlook Express." The script assumes OE is open and
has focus.

For you Auto-It aficionados, here is the simple script text (Sorry, given
the nature of this newsgroup, I can't attach an Auto-It or compiled
stand-alone script. But you Auto-It folks will know what to do, if you are
interested). You can modify to open and wait for OE or to apply to email
rules, etc. Just an idea.

CAUTION!: If you run this while some other window has focus, sending these
keystrokes will have unintended consequences. :O(

; Apply messages rules news
; ==============
;
; OS: Windows 9x/NT
; Author: ; Apply messages rules news

Send,!T
Send, R
Send, N
Send,!A
Send,!A
Send,!B
Send, {PGUP}
Send,{Enter}
Send, !P

Exit


--
Regards,
Anthony Giorgianni

The return address for this post is fictitious. Please reply by posting back
to the newsgroup.
 
A

Anthony Giorgianni

By the way, I think this was done in Auto-It 2. Auto-It 3 folks may need to
change the commands. I have Auto-It 3 but haven't taken the time to learn
it. But you still get the idea.


--
Regards,
Anthony Giorgianni

The return address for this post is fictitious. Please reply by posting back
to the newsgroup.
"Anthony Giorgianni" <[email protected]>
wrote in message
news:[email protected]...
 
S

schrodinger's cat

CAUTION!: If you run this while some other window has focus, sending these
keystrokes will have unintended consequences. :O(

So then, why don't you use the WinActivate command before the Send
commands to give focus to the appropriate OE window?
 
A

Anthony Giorgianni

Great suggestion. I know about WinWait, but not WinActivate. I will check
that out. Thanks!
 
A

Anthony Giorgianni

Hey Schrodinger's Cat

Don't know if you're still watching this thread. But Winactivate doesn't
seem to work well because it is uncertain what the window title will be when
applying the rule. For example, if you've made a rule from a message in
alt.anygroup, then when you go to apply, the top of the OE window will say
"alt.anygroup - Outlook Express." So it will always be different. I guess a
work around would be to send the cursor to the root in the folders list
before activating the script so that "Outlook Express" displays as the
window title, but then you won't be looking at the group anymore and you'd
be guaranteeing the OE window would be the active one anyway.

Any other work-around you can think of? I don't think wildcards work in Auto
It. You're suggestion sure was a good one.


--
Regards,
Anthony Giorgianni

The return address for this post is fictitious. Please reply by posting back
to the newsgroup.
 
S

schrodinger's cat

Hey Schrodinger's Cat

Don't know if you're still watching this thread. But Winactivate doesn't
seem to work well because it is uncertain what the window title will be when
applying the rule. For example, if you've made a rule from a message in
alt.anygroup, then when you go to apply, the top of the OE window will say
"alt.anygroup - Outlook Express." So it will always be different. I guess a
work around would be to send the cursor to the root in the folders list
before activating the script so that "Outlook Express" displays as the
window title, but then you won't be looking at the group anymore and you'd
be guaranteeing the OE window would be the active one anyway.

Any other work-around you can think of? I don't think wildcards work in Auto
It. You're suggestion sure was a good one.

Anthony,

I don't use OE, so I'm not familiar with how the window titles work in
it, but I love AutoIt and have dozens of scripts which automate many
of my regular tasks. (Like you, I use AutoIt 2.6, and have downloaded
AutoIt 3 but have not had the time to fool around with it yet,
although it looks amazing.) As to your problem with OE, you should
check out the AutoIt property "SetTitleMatchMode". This is set at the
beginning of the script and tells AutoIt how to read the window
titles. If it is set to "2" (which is what I almost always do), it
works the same as being able to use wildcards. As long as there is
only one OE window open you can just specify "Outlook Express" as the
window to activate and it should solve your problem. AutoIt can do an
incredible number of things when you get into the fine points of the
script commands. Let me know if this works.
 
A

Anthony Giorgianni

Excellent -- SetTitleMatch, Mode is exactly what I was looking for. Works
great!

That's the thing with AutoIt... there are so many commands. It is hard to
learn ... and remember ... what is there. Even if you read through the
commands, it is difficult to understand why they are useful unless you have
a need for them. I notice that Auto 3 has four modes for SetTitleMatch.

Anyway, so now I have this:

; Apply messages rules news
; ==============
;
; OS: Windows 9x/NT
; Author:
;
; Apply messages rules news
SetTitleMatchMode, 2
WinActivate, Outlook Express
Send,!T
Send, R
Send, N
Send,!A
Send,!A
Send,!B
Send, {PGUP}
Send,{Enter}
Send, !P

Exit

Works exactly right. By the way, one neat idea is using the freeware
AddAButton to add AutoIt scripts to the Internet Explorer toolbar - such as
"save as mht," and "Get mail"

AutoIt is just a great program. One of the freeware giants, in my view.

Anyway, thanks again!!!


--
Regards,
Anthony Giorgianni

The return address for this post is fictitious. Please reply by posting back
to the newsgroup.
 
S

schrodinger's cat

Excellent -- SetTitleMatch, Mode is exactly what I was looking for. Works
great!

That's the thing with AutoIt... there are so many commands. It is hard to
learn ... and remember ... what is there. Even if you read through the
commands, it is difficult to understand why they are useful unless you have
a need for them. I notice that Auto 3 has four modes for SetTitleMatch.
...
AutoIt is just a great program. One of the freeware giants, in my view.
...
Anyway, thanks again!!!

Glad it worked! I know what you mean about the complexity. I always
need to keep the AutoIt help file open to refer to when I am writing a
script, and I am always discovering something new. AutoIt may be my
most indispensable piece of freeware. Can't wait to get into version
3.
 
A

Anthony Giorgianni

Thanks again!


--
Regards,
Anthony Giorgianni

The return address for this post is fictitious. Please reply by posting back
to the newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top