Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending email through Thunderbird

Status
Not open for further replies.

Catoal

Technical User
Feb 15, 2005
13
BE
Hi,

I'm trying to send an email from procomm via thunderbird.

At the moment, my script launches and gives the focus to thunderbird.
I try to open a new message by sendkey CTRL 'N' but it doesn't work!
What's wrong?
Is there an other way to do that or do I have to look at mapisend or outlook procedures?

Thxs for your help
 
This is absolutely possible using Virtual Keystrokes.

I have several scripts that send virtual keystrokes to other windows and it's a little tricky, but not impossible.

Can you paste some of your code so we can see what might be holding you up?

By the way, there is also a sample script on Knobs website that uses sendkey commands that is very useful.

He is at:

Another good idea is to type sendkey into an aspect editor and right-click on it. You can do this to any command and the ProComm Aspect Help is VERY helpful.

Good Luck
 
This is a part of my script, inspired by
proc main
;...
integer iTask, iWindow, iStatus = 0
string sTaskName

if firsttask iTask ;Search list of tasks for thunderbird.exe
taskname iTask sTaskName
if strnicmp sTaskName "thunderbird.exe" 11 ;Search for thunderbird process
taskwin iTask iWindow
winactivate iWindow ;Bring thunderbird to foreground
launch_message() ;Run procedure to open new message
iStatus = 1 ;Set flag indicating thunderbird was found
endif
while nexttask iTask
taskname iTask sTaskName
if strnicmp sTaskName "thunderbird.exe" 11
taskwin iTask iWindow
winactivate iWindow
launch_message()
iStatus = 1
endif
endwhile
endif
if iStatus == 0 ;thunderbird not active
run "C:\Program Files\Mozilla Thunderbird\thunderbird.exe"
pause 5
launch_message()
endif
endproc

Above procedure works fine, launch_message procedure seems not working!

proc launch_message
pause 3
sendkey CTRL 'N' ;Open new message
pause 3
sendkeystr "xxxr@yyy.com"
sendkey ALT 's' ;Move to subject line
pause 3
sendkeystr "warning"
;sendkey CTRL 's'
endproc
 
If you have a script that just runs the launch_message procedure after Thunderbird is running, does it work? My first hunch is that focus is not set properly after running Thunderbird, so the Ctrl-N is not going to the proper window.

 
Hello.

I fixed the problem using a run proc on a VB Script that generate an email.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top