Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CML-Embedded Quotes in a String
#1
How would I embed a quote in a string class in CML, for example:

String mystring;

mystring := "He said, "you did it now""

A single quote won't do me any good.

What I am really trying to do is create a macro (based of the swizzleurl) that puts out a javascript that has lines like:

<SCRIPT LANGUAGE="JavaScript">
.
.
WebOutput += ' CLASSID="CLSIDBig GrinE625294-70E6-45ED-B895-CFFA13AEB044" ';
.
.
</SCRIPT>

That I want to encapsulate in a string and output to the web widget.
Reply
#2
You'll may have trouble until the next release (2.0.1) because it was discovered that there was an issue with escape characters in strings. What you are wanting to do may not be screwed up, but probably it is. So try using \" to escape the quote. If it works, it works. Else, you'll have to hold on for a couple weeks for the next drop. It's already been fixed in my working code.
Dean Roddey
Explorans limites defectum
Reply
#3
Ahhh... thanks Dean, I tried \" and it didn't work. I forgot about the escape problem. I can wait.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CML Macros - Replacing Quotes gReatAutomation 2 260 02-13-2021, 11:59 AM
Last Post: Dean Roddey
  With webriva, anyway to get an embedded browser window? ghurty 1 547 04-26-2020, 04:43 PM
Last Post: Dean Roddey
  Question on Parsing a String in a CML Macro kblagron 2 1,075 06-18-2019, 06:21 PM
Last Post: Dean Roddey
  Embedded Variable in Text zra 2 1,976 05-07-2018, 09:59 AM
Last Post: zra
  String list in actions znelbok 3 2,239 11-06-2017, 04:10 PM
Last Post: Dean Roddey
  Saving and Loading String Lists pjgregory 5 3,361 03-15-2017, 08:33 AM
Last Post: Dean Roddey
  Viewing the Embedded File Tag Repository kblagron 13 4,953 08-02-2016, 09:53 AM
Last Post: kblagron
  Inserting global variable into command string MikeA 2 1,920 06-26-2016, 10:09 AM
Last Post: MikeA
  CML - Wrapping String Literals wuench 3 1,606 12-12-2015, 03:52 PM
Last Post: Dean Roddey
  Working with string lists dlmorgan999 13 4,738 05-26-2015, 06:16 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)