AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Safe Outlook Express Email Deleter

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Larry



Joined: 03 Mar 2005
Posts: 20

PostPosted: Mon Jul 18, 2005 4:40 pm    Post subject: Safe Outlook Express Email Deleter Reply with quote

One shortcoming of Outlook Express is that it's easy to accidently delete a mail folder if you're not paying close attenton. So I set out to write a Script that would prevent such an accident from happening. I'm using the following script with Windows XP Pro SP2 and Outlook Express v6.00.2900.2180:

Code:
;===== Beginning of Script =====
; *** Outlook Express Safe Message Deleter ***

~RAlt:: ; Double-Click Right Alt Key to Delete Email
if (A_PriorHotkey <> "~RAlt" or A_TimeSincePriorHotkey > 400)
{
   ; Too much time between presses, so this isn't a double-press.
   KeyWait, RAlt
   return
}

DetectHiddenWindows, on
SetTitleMatchMode, 2
SetTitleMatchMode, Slow
SetKeyDelay,0
IfWinActive, Outlook Express
{
send,^q
sleep,99
send,^d
sleep,99
errorlevel=0
controlgettext, q,, Outlook Express, folder
If errorlevel=0
{
Loop, 9
{
SoundPlay, *-1
SoundBeep, 999,55
}
msgbox,. . . . . . . . . . . . . .      Y O U _  C A N _  N O T _ D E L E T E _ A _  F O L D E R   ! ! !       . . . . . . . . . . . . .
Send, n
}
controlgettext, q,, Outlook Express, permanently delete
If errorlevel=0
{
send, y
}
}
Done:
return
;===== End of Script =====

In addition to the script saving my mail folders from accidental deletion,
I also find it to be a more convenient method for deleting emails than
using the mouse.

One thing I would like to add to the script though is the ability to take Outlook Express offline before it deletes the email (to prevent the next automatically selected email from being able to download an image, thus verifying my email address as valid to a spammer). I haven't figured out an easy way to do this though. The Offline toggle in Outlook Express doesn't have a Keyboard Shortcut.

Perhaps other AutoHotkey users would find Offline and Online commands in AutoHotkey to be very useful additions to an already great scripting utility too.

If anyone has any additions or improvements they would care to make to the above script, feel free to contribute. I'm fairly new to AutoHotkey and still anxious to learn new things about it.

Regards,
Larry
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group