;===== 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