Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Appending text to an Outlook Email Subject

$
0
0
I have an accounting system that generates emails to our customers.  It creates each email individually and brings up the Outlook window for each one.  The user is intended to review the email and then click 'send'

This is a daily process with many emails, so I have successfully created an Autoit script to detect the Outlook email window and to send the hot key the sends the email.

So far, so good - however, the accounting program also populates the Subject field of the email and what I want to do is append a text string to the end of the existing text.  Not having much luck.  I want to avoid 'clicking' into the field due to the fact that I do not always know exactly where it will be on the desktop.

Using info and recorder, I have the following so far... note that the text appending code does not work, but the email does send...

[ autoit ]         
#region ---Au3Recorder generated code Start (v3.3.7.0) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay', 100) Opt('WinDetectHiddenText', 1) Opt('MouseCoordMode', 0) EndFunc ;==>_Au3RecordSetup Func _WinWaitActivate($title, $text, $timeout = 0) WinWait($title, $text, $timeout) If Not WinActive($title, $text) Then WinActivate($title, $text) WinWaitActive($title, $text, $timeout) EndFunc ;==>_WinWaitActivate _AU3RecordSetup() #endregion --- Internal functions Au3Recorder Start --- While 1 _WinWaitActivate("Invoice # ", "MSO Generic Control ") Local $sText = ControlGetText("Invoice # ", "", 4101) $sText = $sText & " - From Company Name, Inc." ControlSetText("Invoice # ", "", 4101, $sText, 1) Sleep (500) ControlClick("Invoice # ", "", "[TEXT:&Send]", "left", 1) Sleep(500) WEnd #endregion ---Au3Recorder generated code Start (v3.3.7.0) ---

This is the window info I have obtained in the attached Autoit_Info.JPG ...  Any help would be greatly appreciated

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>