Adapt the right coding for $put from there ...
Export scripting: unexpected variable assignment between loops
Export script example 1:
1: $filename($getEnv('USERPROFILE')'\Desktop\Finished-Albums.txt',UTF-8)2: $loop(%ALBUM%)$loop(%_path%)$puts(TrackCount,$if(%TRACK%,$add(1,$get(TrackCount)),$get(TrackCount)))$loopend()
3: $if($eql(%_max_counter%,$get(TrackCount)),' Album finished: ','# Album not finished: ')$if2(%ALBUM%,'[no album name]')$puts(TrackCount,0)$loopend()
Export script example 2:
01: $filename($getEnv('USERPROFILE')'\Desktop\Finished-Albums.txt',UTF-8)$puts(02: )$loop(1,1)$puts(crlf,$char(13)$char(10))$puts(br,'{br}')$loopend()$replace(
03:
04: $loop(%ALBUM%)$replace(
05:
06: 'ALBUM: '$put(AlbumCount,$add(1,$get(AlbumCount)))' : '%ALBUM%$get(br)
07:
08: $loop(%_path%)$replace(
09:
10: 'File : '$put(FileCount,$add(1,$get(FileCount)))' : '%_path%$get(br)
11:
12: $puts(TrackCount,$if(%TRACK%,$add(1,$get(TrackCount)),$get(TrackCount)))
13:
14: ,$get(crlf),,$get(br),$get(crlf))$loopend()
15:
16: 'FileCount : '$get(FileCount)$get(br)
17: 'TrackCount: '$get(TrackCount)$get(br)
18:
19: $if($eql($get(FileCount),$get(TrackCount)),'# Album finished: ','### Album not finished: ')$if2(%ALBUM%,'[no album name]')
20: $get(br)$get(br)
21:
22: $puts(FileCount,0)
23: $puts(TrackCount,0)
24:
25: ,$get(crlf),,$get(br),$get(crlf))$loopend()
26: ,$get(crlf),,$get(br),$get(crlf))
DD.20140808.1044.CEST