Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/29/2022 in all areas

  1. Updated the first post with this major upgrade/changed version for all to have a go and let me know whether things work for you.
    2 points
  2. Latest update just released. See below for change log.
    1 point
  3. _Download(@ScriptDir & '\mp3.txt', 'files_links', @DesktopDir & '\mp3-songs\')
    1 point
  4. Maybe: Open Helpfile Search
    1 point
  5. Here's what a conversation between friends looks like. 😁 btw. @Zul 2️⃣4️⃣um
    1 point
  6. @Subz is certainly right. The Sample.txt is missing or empty. On the other PC it is present, therefore no error message appears. Here is a runable test version with extended error messages. Since you did not include an example of a Sample.txt, I created one myself for testing purposes. #include <File.au3> #include <String.au3> #include <Array.au3> Global $vfile CheckTemp() Func CheckTemp() ;$vfile = "C:\Users\Username\Desktop\Sample.txt" $vfile = @ScriptDir & "\Sample.txt" ; ; *** only for test Local $aFile, $aFinal[0], $iError, $sErrorMessage _FileReadToArray($vFile, $aFile) $iError = @error If $iError <> 0 Then Switch $iError Case $iError = 1 $sErrorMessage = "Error : Opening specified file" Case $iError = 2 $sErrorMessage = "Error : Unable to split the file" Case $iError = 3 $sErrorMessage = "Error : File lines have different numbers of fields" Case $iError = 4 $sErrorMessage = "Error : No delimiters found" Case Else $sErrorMessage = "undefined error : " EndSwitch Exit MsgBox(BitOR(4096, 16), "Error", $sErrorMessage & @CRLF) EndIf _ArrayDisplay($aFile, "aFile :") ; *** only for test For $i = 1 to $aFile[0] $sTemp = _StringBetween($aFile[$i], "Temperature", "Celcius") If $sTemp <> 0 Then _ArrayAdd($aFinal, $sTemp) Next _ArrayDisplay($aFinal, "aFinal :") ; *** only for test ;~ If $aFinal[0] > 40 Then ;~ $oOApp = ObjCreate("Outlook.Application") ;~ $oOMail = $oOApp.CreateItem ($olMailItem) ;~ $oOMail.Save ;~ ;With $oOMail ;~ ;.To = ($to) ;~ ;.;Subject = $subj ;~ ;.Importance= $olImportanceHigh ;~ ;.HTMLBody = &body ;~ ;.attachments.add ("") ;~ ;.Send ;~ ;EndWith ;~ MsgBox($MB_SYSTEMMODAL, "Current Temperature", $aFinal[0], 2) ;~ EndIf ;~ $oOApp=0 ;~ FileClose($vfile) EndFunc sample.txt
    1 point
  7. Use error checking for example: _FileReadToArray($vFile, $aFile) If @Error Then Exit MsgBox(4096, "Error", "Error reading file to Array")
    1 point
×
×
  • Create New...