Jump to content

kparker

Members
  • Posts

    2
  • Joined

  • Last visited

kparker's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I did look at the help file and did not see an indicator of the answer. The @error variable that inherits a value when a function produces an error; is this value overwritten as success if a function right below it is successful? It seems that I could possibly check the error value at the end of a UDF if it always maintains an error value once generated, but if its overwritten by successful functions, I would have to check every function call. I find this more relevant for browser automation. i.e. checking every time I navigate.
  2. Good Afternoon, New user of AutoIT, stumbled across it when trying to solve that dreaded browser file upload automation problem. Currently having this issue and perhaps someone can point out whats going on. If I switch the contents of email body and copy and paste the demo lines, it works, If I type something myself, it fails? Local $as_Body[2] $as_Body[0] = "Testing the new email udf" $as_Body[1] = "Second Line" Local $emailSubject = "Test" Local $emailBody[2] $emailBody[0] = "No Matter What I type I fail" $emailBody[1] = "but if I copy the contents above in $as_body, I succeed?" sendEmail($emailSubject, $emailBody) func sendEmail($sSubject,$emailBody) Local $iResponse =_INetSmtpMail("ServerTime", "BGService", "bgservice@credcontrol.com", "itdept@credcontrol.com",$sSubject,$emailBody, @computername, -1) Local $iErr = @error If $iResponse = 1 Then MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent") Else MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr) EndIf EndFunc
×
×
  • Create New...