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

Refresh a variable that is used inside another variable

$
0
0

Hi all,

I have created a variable ($results) to contain variables to write to a CSV file. The variables are assigned many times throughout the script. I noticed that the $var1,$var2,$var3 variables inside the $results variable to be written to the CSV file are not acknowledging the values if they occur after the $results declaration in the script.

Probably an example will better explain. Is there a way to 'refresh' the $results variable before it writes so that it can capture values from later variables? I looked at ReDim but that seems to be only for arrays.

 

Thank you

$var1 = 0 $var2 = 0 $var3 = 0 $results = $var1 & "," & $var2 & "," & $var3 $var1 = 1 $var2 = 2 $var3 = 3 ConsoleWrite($results)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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