@VWKM, sometimes it can be a challenge to get things just right.
I have fixed your Macro, but for educational purposes, let me first explain the problems and changes. Note: All of your original Actions are shown as dark grey (disabled), and my replacement Actions are shown in teal.
First, there was an error in @peternlewis' post:[quote="peternlewis, post:3, topic:2936"]
Set variable Index to 1
[/quote]
should have been:
Set variable Index to 0
Actually, a new index variable was NOT needed, since in my original macro I already had:
In any case, I made this correction:
Next, this Action has two problems:
- It occurs before the index is updated.
- The "to:" field is wrong
The correct "to" field is shown below.
Next, you used "Set Variable to Text" for the "Index" variable.
It should be "Set Variable to Calculation"
Now you are ready to create the new "Var" variable, and assign the current line from the file to it:
I added this Action to log the results:
So, now, when I run your macro with my corrections, the result is:
<img src="/uploads/default/original/2X/d/d571be1c8454660bf96606ba1a2229dbe6b4f7c9.png" width="510" height="265">
Here's the corrected Macro:
###MACRO: [FILE] Process Lines in Text File -- @VWKM version with @JMichaelTX Corr
~~~ VER: 1.0 2017-05-07 ~~~
####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/b/b132d17273f88af1facb72ae9cf86a4dfbaacac3.kmmacros">[FILE] Process Lines in Text File -- @VWKM version with @JMichaelTX Corr.kmmacros</a> (13 KB)
---
###ReleaseNotes
REVISED 2017-05-07 3:34 PM CT BY @JMIchaelTX
to correct problems in version by @VWKM
---
<img src="/uploads/default/original/2X/5/5b138254f972424c1d20bbca4de192b247986e1d.png" width="389" height="2000">