Macro: quotation mark in string

imagej
macro

#1

Hello,

how do I include a quotation mark into a text-string variable in an imageJ-macro? The string should look like “X and Y”, i.e. including the opening and closing quotation marks.

Hermann-Josef


#2

Good day Hermann-Josef,

you must escape the quotation mark by a back-slash.

print("\"X and Y\"");

HTH

Herbie


#3

@Herbie Thanks a lot for the fast reply. Yes, that did the trick!

Hermann-Josef