Recently Browsing 0 members
No registered users viewing this page.
i have an AutoIT script that sends emails with two embedded images.
When users get the email they don't see the images. How should I fix my code?
Thank you for your support,
Func fSendMail() $TemplateName = StringRegExpReplace($Template, "^.*\\|\..*$", "") $SmtpServer = "smtp.**.com" $FromName = "do-not-reply@*********" $FromAddress = "do-not-reply@******" $ToAddress = $MG1_Mgr & ";"& $Owner $Subject = "ACTION REQUIRED - " & $TemplateName $Body = $sBody5 $IPPort = 25 $ssl = 0 Global $oMyRet Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = fINetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $IPPort, $ssl) If @error Then MyErrFunc() EndIf EndFunc;fSendMail Func fINetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $IPPort = 25, $ssl = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 Then $IPPort = 25 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort $objEmail.Configuration.Fields.Update $objEmail.Fields.Update ;$objEmail.Send **************** If @error Then MyErrFunc() EndIf $objEmail = "" EndFunc;fINetSmtpMailCom
here is an example about how to split your texts using a delimiter with the ability to select how much of delimiters shows in each colum with $i_number
you have a long text and you want to split it in an array
that evry colum have a number (n) of lines
i made a function that do that for you
just call it with a three params
the number that you want to put in each col
default is "|"
here is the function with example
i hope that it will be useful for you
#include <Array.au3> $s_txt = "some text1some text2|some text3|some text4|some text5|some text6" $array = splitText($s_txt, 2) _ArrayDisplay($array) Func splitText($s_text, $i_number, $s_siparator = "|") Local $a_TXT = StringSplit($s_text, $s_siparator) Local $a_Return[$a_TXT + 1] If ($a_TXT <= $i_number) Or ($i_number <= 0) Then ReDim $a_Return $a_Return = 1 $a_Return = $s_text Return $a_Return EndIf Local $i_Processed = 1, $i_arrayProcessed = 1 Do For $i = $i_Processed To ($i_Processed + $i_number) - 1 If ($a_TXT < $i) Then ExitLoop If Not ($a_Return[$i_arrayProcessed]) Then $a_Return[$i_arrayProcessed] = $a_TXT[$i] Else $a_Return[$i_arrayProcessed] &= $s_siparator & $a_TXT[$i] EndIf $i_Processed += 1 Next $i_arrayProcessed += 1 Until ($a_TXT < $i_Processed) ReDim $a_Return[$i_arrayProcessed] $a_Return = $i_arrayProcessed - 1 Return $a_Return EndFunc ;==>splitText
accept my greetings
for his notes
Im developing an script to check the size of all .jpg stored in windows folder.
The problem is that it doesn´t work properly with rotated images.
With _GDIPlus_ImageGetWidth() and _GDIPlus_ImageGetHeight() I get the Width and Height of images as if they had not been rotated, and I need to know how they are rotated (orientation and grades).
Any help is welcome! If more info is needed, please tell. 😁
hello autoit team
please i've a question for you.
am creating a audio player
and in this audio player i want to show the current trac info
such as the total time and the position ... etc
i know i can show it as label
but the screen reader for the blind read the text every change
because it have a screen scan
what i want is to show this informations but such image or icon
i mean i need to create
GUICtrlCreatepic or GUICtrlCreateicon ....
or some thing as that
and show this informations as image on it
i think that i can do that with the
but i couldn't find the currect way to do it
i tried the _GDIPlus_GraphicsDrawString
but i couldn't know how it work
what i need is a small example that create a GUI
and add a multy line text to it as graphic or image.
so i need a simple way because it will changed every sec
i hope any one can help me to do that
global $GUI = GUICreate("text", 400, 400) global $label = GUICtrlCreateLabel(GetText(), 10, 10, 380, 380) GUISetState() do sleep(100) until GUIGetMSG() = -3 exit func GetText() return StringFormat("file name is test.mp3 \r\n total time is 00:30:00 \r\n position is 00:05:50") endFunc