So I'm currently working on macros to use with the chatsetattr API to toggle between the various whisper modes on the roll20 sheet, and for query whisper, I have this code: !setattr --sel --silent --replace --wtype|'\ques{Whisper\ques|Public Roll,|Whisper Roll,/w gm }' The problem is that the API is interpreting the second pipe in the macro as the pipe to move on to the attribute's max value, even though it's in quotes. The documentation does have a number of replacement options for problematic characters: --replace will replace the characters < , > , ~ , ; , and ` by the characters [,],-,?, and @ in attribute values. This is useful when you do not want roll20 to evaluate your expression in chat before it is parsed by the script. Alternatively, you can use \lbrak, \rbrak, \n, \at, and \ques to create [, ], a newline, @, and ?. but none of them are for the pipe. I tried the html entity &#124; and that didn't work either. I was going to try something like !setattr --sel --silent --replace --wtype|'\ques{Whisper\ques'
!setattr --sel --silent --replace --wtype|@{selected|wtype}'|Public Roll,|Whisper Roll,/w gm }'
//etc... but then realized I would still need to include the pipe character for that to work, so it doesn't actually solve the problem as such. I also tried setting the value '|' to the character these macros are being loaded onto and using !setattr --sel --silent --replace --wtype|'\ques{Whisper\ques@{Toggles|pipe}Public Roll,@{Toggles|pipe}Whisper Roll,/w gm }' but that didn't work either as it also interpreted the pipe in @{Toggles|pipe} as a signal to move on to the max value for the attribute.