how to print semicolon in an annotation
proland
I have a string which containts a semicolon, which i know is treated by IGOR as a list. When I try to place this string in an annotation, it only adds the portion up until the semicolon. For instance, if I try
textbox/c/f=0 "Hello, this is a string; which has a semicolon."
The textbox will only contain "Hello, this is a string"
Is there a way to have IGOR print this semicolon like how you can do \\r to have "\r" appear in the annotation? I know I could append the separate strings from the list, but I still want the semicolon in the final annotation.
Thanks
•textbox/c/N=text0/f=0 "Hello, this is a string; which has a semicolon."
The result was a textbox showing all of the text; it wasn't cut off at the ; character.
(I used Igor 6.22 on Windows XP.)
I suspect you have oversimplified your problem description.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
March 19, 2012 at 11:18 am - Permalink
In my macro, I used the command, with the string explicitly written, and it worked.
If I use the string from the text wave, it cuts off. Now i'm more confused.
March 19, 2012 at 11:22 am - Permalink
wave0[0] = "Hello, this is a string; which has a semicolon."
display
textbox/f=0 wave0[0]
textbox/f=0 "Hello, this is a string; which has a semicolon."
the two textboxes look different.
March 19, 2012 at 11:42 am - Permalink
I don't see this. Try this:
Make/O/T/N=1 twave0
wave/t twave0
twave0[0] = "Hello, this is a string; which has a semicolon."
Display
TextBox /f=0 /X=5 /Y=5.00 "Hello, this is a string; which has a semicolon."
TextBox /f=0 /X=5 /Y=25.00 twave0[0]
End
In IP 6.22A on Macintosh and Windows, the textboxes have the same text.
Possibly you are using StringFromList somewhere along the way and treating semicolon as a delimiter.
March 19, 2012 at 12:47 pm - Permalink
March 19, 2012 at 04:40 pm - Permalink
So all i need to do is find the string position of "Text:" in the annotationinfo string and go from that position until the end of the string to get the full text.
March 19, 2012 at 04:56 pm - Permalink