Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Sep 2011
    Posts
    193
    Thanks
    22
    Thanked 20 Times in 11 Posts

    How can I create a simple keystroke macro for Thunderbird?

    I'm trying to speed up the time it takes me to respond to emails. I don't have received messages automatically quoted in my replies, as many times I don't want that to happen, but there are times when I do want the message appended and a horizontal line separating the new message from the older one. To do that in TB, I normally have the following sequence of keystrokes:
    Ctrl-A
    Ctrl-R
    Ctrl-Home
    Enter (Return)
    Alt-i
    Alt-o
    Up Arrow

    I'd like to create a simple keystroke macro that would execute all those steps with a single keystroke or click. I've done this within various other programs, but don't know if there's a way to make this happen within TB. Any thoughts on this will be appreciated.

    Thanks.
    Windows 7 Pro, 64-Bit, SP1 on desktop
    Windows 7 Pro, 64-Bit, SP1 on HP ProBook
    Windows 7 Home Premium, 32-bit, SP1 on HP Mini 5103
    Windows XP/Media Edition, SP3 on OLD Dell laptop
    Samsung Galaxy S5 running Lollipop 5.0

  2. #2
    Star Lounger
    Join Date
    Feb 2012
    Posts
    58
    Thanks
    2
    Thanked 5 Times in 4 Posts
    Here is a simple AutoIt script. After the script is activated, it waits 3 seconds, during which the user is expected to give focus to the correct window. Then, if the active window has "Mozilla Thunderbird" in the title bar, it simulates the keystrokes you specified.

    Something similar could probably be accomplished with PhraseExpress, AutoHotKey, etc.

    To activate the script by hotkey, create a shortcut to the script and specify a "Shortcut key" in the shortcut's properties.

    I could send you this script as an .exe, but you should not accept executable files from strangers.

    Code:
    Opt("WinTitleMatchMode", 2)  ; 1=start, 2=substr, 3=exact, 4=advanced, -1 to -4=lowercase
    Sleep(3000)
    If WinActive("Mozilla Thunderbird") Then
    	Send("^a^r")
    	Send("^{HOME}{ENTER}")
    	Send("!i!o{UP}")
    EndIf

  3. #3
    Star Lounger
    Join Date
    Feb 2012
    Posts
    58
    Thanks
    2
    Thanked 5 Times in 4 Posts
    Even simpler. Here is a barebones VBScript that does the same thing -- except that it does no checking at all. Save the script as a plain text file with the file name extension .vbs. Run the script, and within 3 seconds activate the target window. The script will then simulate the keystrokes that you specified.

    Code:
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WScript.Sleep 3000
    WshShell.SendKeys "^(a)^(r)"
    WshShell.SendKeys "{HOME}{ENTER}"
    WshShell.SendKeys "%(i)%(o){UP}"
    Set WshShell = Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •