04-21-2016 09:55 AM
Hello!
I am trying to paste in different string indicators what it is in the clipboard.
In the clipboard there will be three values, as you can see in the image and i want to display each in a different indicator. However I am getting only the first one...
What should I change?
Thanks a lot in advance!
Jess
Solved! Go to Solution.
04-21-2016 10:07 AM
ss,
most probably you're using the wrong search char!
Display the received string in an indicator and set its display mode to "\-code". Then you will see the "end of line" character in your string.
After you know which one to use you could use SpreadsheetStringToArray to split up your string into three parts much easier than using MatchPattern!
04-21-2016 10:09 AM
Since you only posted a picture I have no idea what to change. A starting place would be to put an indicator on the output of the clipboard read and then switch it to "\" code view. There could be hidden characters in the string.
04-21-2016 10:11 AM
I guess your line separator is not correct. Check code of the separator (string indicator in "\ codes display" mode). Carriage return is \r
Also you can use match pattern instead, [\r\n]+ as pattern (one ore more \r or \n in any combination)
04-22-2016 07:06 AM
Thanks for the suggestions!
I am trying to get the array. However i am getting in the first array element the all the values of the clipboard. I have tried with tha tab delimiter to split the string and with the space constant as you can see in the image...
Any idea about how to separate it..
Thanks!
04-22-2016 07:13 AM
04-22-2016 01:01 PM - last edited on 07-18-2024 03:48 PM by Content Cleaner
@GerdW wrote:
again you just attached an image instead of a snippet or VI…
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2PkCAI&l=en-US
Basically a snippet is an image, that has executable LabVIEW source in it. You can post it to the forums and it can be seen, but you can also run the picture in LabVIEW by dragging it to a block diagram.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-25-2016 02:47 AM
Thank you!
I am attaching the snippet. I have managed to get what I want (each line in a different indicator) with a string that has the following attributes>
abc;
def;
ghi;
However I am not able to add the ";" at the end of each line. I have tried what I have attached. Any suggestion?
Thank you very much!
04-25-2016 06:08 AM
I am trying to get ";" after the end of each line as attached.
However I don't get it.. I have tried with end of line constant, tab constant and several others..
Any idea to make it work?
Thanks!
04-25-2016 11:38 AM