Automate sending images from Paperport

From MozillaZine Knowledge Base

The following script will launch Thunderbird, opening the compose message window with the file sent from Paperport attached to the message. You just need to fill in the email address and subject, and press the Send button.

The script uses AutoIt , a freeware scripting language for the Windows GUI. If you didn't install Thunderbird in the default location you will need to edit its path in the script. While written for Thunderbird, you could easily modify it to support Mozilla Suite / SeaMonkey since they support the same command line argument.

; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: J. Borak
; Script Function:
; Automate the sending of an email to Thunderbird from Paperport using the AutoIT scripting tool.
; Set the "Sendto" bar in paperport to access this script after it has been compiled.
; Copy the file sent from Paperport to c:\ and name it scan.jpg
; Start Thunderbird and open the compose window
; Wait for the compose window to become active
; Send the keys to attach a file to the email
; Specify the c:\scan.jpg file
; Hit enter
; Now specify the email address to send the message to and the subject.
FILECOPY("""%1""", "c:\scan.jpg")
RUN("c:\program files\mozilla thunderbird\thunderbird.exe -compose")
WinWaitActive("Compose: (no subject)", "", 5)
Send ("c:\scan.jpg")