cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1378
Views
8
Helpful
6
Replies

UCCX Script Editor Prints Garbage at times

WilliamEWelch
Level 1
Level 1

UCCX 8.5.1.10000-37

UCCX Editor v 8.5(1.0)

I know several have commented on the ugly printing from the Script Editor but here is a simple example which I will forward as an SR to TAC:

Bug.png

The above script with a Set statement for a string variable prints the following:

BugPrint.png

6 Replies 6

WilliamEWelch
Level 1
Level 1

FYI - SR # 626853703.

Is there a reason you are using Document object Text literals to build a String?  Seems very ineffecient to me.  You are basically instantiating six Document objects, and then casting them to Strings.  This makes UCCX work harder than it needs to.

The above example could be simplified with the following, which is less processor/memory heavy than using Documents, and also has the benefit of printing a little nicer:

Script

Printed

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony,

Thanks for the suggestion. I was originally having some issue which I've since forgotten about with single and double quotes and 'discovered' the Text[] construct as a fix.

I'll go back and make the changes you've suggested to my http/html code in my script.

Thanks,

Bill

Yeah that can be a pain.  If you google how to include quotes inside of a Java String you will see that the syntax is as simple as:

String my_string = "This is a \"quoted\" word inside a string.";

However, if you try to do that in the editor, it will raise an exception:

Unable to parse expression; un-terminated string: " (line: 1, col: 4)

So the way you have to do it is with the little "u" trick, which allows escape characters in the String.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

I converted my strings from the Text[] style and things are working well with the u"...." where needed.

Printing is still messed up tho. I also tried the Reduce (F9 I think) in the value field editor to get the assignments down to a single (unreadable) line and printing is still bad. Just looks like the print function has difficulty with long lines and wrapping them onto the printed page.

anthony - thanks again for educating me on the quoted strings.

You're welcome.  For what it's worth, you educated me on the Reduce feature (it is F9).  I have never used that before.  It then inturn introduced me to the Protect and Parse as well.  So, in a way, I learned more from you, then you did from me!  Thank you!

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.