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

Persistant variables

$
0
0

Hello,

 

Can someone please tell me why this isnt working or how to get this particular part working?

 

After ending this loop: For $masterRe = 1 To UBound($masterArray) -1

This variable content dissapears: $queueM1

 

For example, this part does not work:

 

If $match1 = "Yes" And $queueM1 = "US_L1_Call Center System Alerts" Or $queueM1 = "US_L1_Customer Support System Alerts" And Not ($statusM1 = "RETAILER STATUS") Then
        FileWrite($RF_Updates1, "Replace" & "," & $master_st & "," & $incidentID1 & "," & $incidentticket1 & "," & "Old Description" & "," & $descriptionM1 & "," & "New Description" & "," & $T_desc & @CRLF)
    EndIf

AutoIt         
$dbday = StringReplace(_NowCalcDate(), "/", "-") $sFilePath_list_master = @ScriptDir & "\master.xls" $trendsreport = @ScriptDir & "\result-" & $dbday & ".csv" $RF_Updates= @ScriptDir & "\RF_Updates.csv" $RF_Updates1 = FileOpen($RF_Updates, 1) $RF_New = @ScriptDir & "\RF_New.csv" $RF_New1 = FileOpen($RF_New, 1) Local $masterExO = _Excel_Open()     Local $masterEx = _Excel_BookOpen($masterExO, $sFilePath_list_master)     Local $masterArray = _Excel_RangeRead($masterEx, Default, $masterEx.ActiveSheet.Usedrange.Columns("A:K"), 1, True) Local $trendArray _FileReadToArray($trendsreport, $trendArray) For $T = 2 To Ubound($trendArray) -1     $T1 = StringSplit($trendArray[$T], ",")     $T_st = StringRight($T1[1], 8)     $T_desc = $T1[8]     Local $match1 = "No"     For $masterRe = 1 To UBound($masterArray) -1     $incidentID1 = $masterArray[$masterRe][0]     $incidentticket1 = $masterArray[$masterRe][1]     $chainM1 = $masterArray[$masterRe][3]     $queueM1 = $masterArray[$masterRe][10]     $statusM1 = $masterArray[$masterRe][7]     $descriptionM1 = $masterArray[$masterRe][5]     $categoryM1 = $masterArray[$masterRe][6]     $master_st = ""         If Not ($chainM1 = "") Then             $master_st = $masterArray[$masterRe][3] & "-" & $masterArray[$masterRe][4]         ElseIf $chainM1 = "" And $queueM1 = "US_L1_Call Center System Alerts" Or $queueM1 = "US_L1_Customer Support System Alerts" Then             $master_st = StringLeft($descriptionM1, 8)         EndIf         If $T_st = $master_st Then             $match1 = "Yes"         ;   MsgBox($MB_SYSTEMMODAL, '', $match1 & "-" & $T_st & "-" & $master_st )         EndIf         ;If $queueM1= "US_L1_Call Center System Alerts" Or $queueM1 = "US_L1_Customer Support System Alerts" Then MsgBox($MB_SYSTEMMODAL, '1', $queueM1 & "-" & $match1 & "-" & $queueM1 & "-" & $statusM1  )     Next     If $queueM1= "US_L1_Call Center System Alerts" Or $queueM1 = "US_L1_Customer Support System Alerts" Then MsgBox($MB_SYSTEMMODAL, '2', $queueM1 & $match1 & $master_st & "-" & $statusM1)     ;MsgBox($MB_SYSTEMMODAL, '', $match1 & "-" & $queueM1 & "-" & $statusM1 )     If $match1 = "Yes" And $queueM1 = "US_L1_Call Center System Alerts" Or $queueM1 = "US_L1_Customer Support System Alerts" And Not ($statusM1 = "RETAILER STATUS") Then         FileWrite($RF_Updates1, "Replace" & "," & $master_st & "," & $incidentID1 & "," &  $incidentticket1 & "," & "Old Description" & ","  & $descriptionM1 & "," & "New Description" & "," & $T_desc & @CRLF)     EndIf     If $match1 = "No" And Not ($master_st = "") Then         FileWrite($RF_New1, $trendArray[$T] & @CRLF)     EndIf         ;_ArrayDisplay($masterArray) Next

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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