Pipe | is seen as a line break

Tell us what needs improvements
Post Reply
mattdoyal
Posts: 4
Joined: Mon Jun 05, 2017 7:21 pm

Pipe | is seen as a line break

Post by mattdoyal » Sat Nov 18, 2017 12:03 am

Not sure if this is working as designed or not, but I have a macro that sets a variable from text that sometimes contains pipes <|>.
When inserting the variable, it prompts me to select which line, each line is from where the pipes were. I want it to use everything from the field that was copied, but can't seem to work around this. If the field does not have a pipe, it sets the variable fine. I do not have control if pipes are used or not.
example:
What it is copying:
123456789 | ProductType | Issue | Sometimes some other information

Code:
<varset>("vTitle=%_vClpText%","")<#>
<varout>("%vTitle%",0)<#>

When it hits the <varout> it displays a dialog box and prompts me to select which line:
123456789
ProductType
Issue
Sometimes some other information

Any way to get it to ignore the pipes and line breaks?

mattdoyal
Posts: 4
Joined: Mon Jun 05, 2017 7:21 pm

Re: Pipe | is seen as a line break

Post by mattdoyal » Thu Dec 14, 2017 5:26 am

Thought I would provide an update on this:
<ctrl>c<ctrl><#>
<var_parse>("%_vClpText%","","|",%vTitle%,vNumOfPipes)<#>
<varout>("%vTitle%",1)<#>

This seems to provide me exactly what I need. It does nothing to the pipes, unless the last character is a pipe, it will remove it, and I am fine with that.

Example:
If I start with
testing | test | 1234 | 5678 |
I end with
testing | test | 1234 | 5678 |
I have a space at the end, so it doesn't remove the pipe.

Post Reply