I'm also struggling with split and join using a variable as a
separator.
I have some tasks that put a status line at the beginning of an
eventlog using Variable Set %EVENTLOG "%STATUS\n%EVENTLOG", where the
\n is the enter key. In order to keep the eventlog from getting too
long, I'm adding lines at the top and truncating them from the
bottom. I created a %NEWLINE variable with just a return in it. I
then Variable Split the %EVENTLOG variable with %NEWLINE as a
separator, which works. I then Variable Clear %EVENTLOG2+, which
removes the 20th through 29th lines and Variable Join %EVENTLOG with
%NEWLINE as the separator. Tasker interprets %NEWLINE as a string,
not a variable.
Here's an example script:
Task: Test (9)
A1: Variable Set [ Name:%TEST To:This
Is
A
Test
Of
Splitting
And
Joining
Variables
With
Tasker Do Maths:Off Append:Off]
A2: Variable Set [ Name:%NEWLINE To:
Do Maths:Off Append:Off]
A3: Variable Split [ Name:%TEST Splitter:%NEWLINE Delete Base:Off]
A4: Variable Clear [ Name:%TEST1+ Pattern Matching:On]
A5: Variable Join [ Name:%TEST Joiner:%NEWLINE Delete Parts:On]
A6: Flash [ Text:%TEST Long:On]
I expect to see:
This
Is
A
Test
Of
Splitting
And
Joining
Variables
Instead, I get:
This%NEWLINEIs%NEWLINEA%NEWLINETest%NEWLINEOf%NEWLINESplitting
%NEWLINEAnd%NEWLINEJoining%NEWLINEVariables
Is there a workaround?
Thanks,
Rick
On Sep 23, 4:16 am, Pent <
supp...@apps.dinglisch.net> wrote:
> > Not working withVariableJoin. I'm running the latest beta. I added
> > "Flash %newline" to the task, and now the toast notification isn't
> > going away, either.
>
> That's interesting, well done :-)
>
> I'll see if I can reproduce that and try thejoin. I only tested with