Good morning Alan and thank you for your last reply.
Using an alert, popup, and such will block the code from running and/or be visible on the device when I need it on the computer; in any case, I bypassed it by breaking the printed message into 96 chars long (the length of the debug trimmed messages) and print them to the debug console; I then wrapped it in a Plugin for easier use;
For example, this is a comparison between using “console.log” and my cute little plugin:
app.LoadPlugin( “MultiLineLog” );
plg = app.CreateObject( “MultiLineLog” );
const longTxt = “A man is smoking a cigarette and blowing smoke rings into the air. His girlfriend becomes irritated with the smoke and says, “Can’t you see the warning on the cigarette pack? Smoking is hazardous to your health!”\nTo which the man replies, “I am a programmer. We don’t worry about warnings; we only worry about errors.””
console.log( longTxt );
console.log( “////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////“ );
plg.log( longTxt );
and the printed result shown in the screenshot below:
here's the MultiLineLog Plugin for anyone who wants to use it.
Best,
WT
function MultiLineLog()
{
this.log = function( msg, color )
{
var msgLength;
var numChunks;
var chunks;
var msgColor;
if (color == null)
{
msgLength = 96;
numChunks = Math.ceil(msg.length / msgLength);
chunks = new Array(numChunks);
for (let i = 0, o = 0; i < numChunks; ++i, o += msgLength)
{
console.log(msg.substr(o, msgLength));
}
}
else
{
msgLength = 68;
numChunks = Math.ceil(msg.length / msgLength);
chunks = new Array(numChunks);
msgColor = "<div style='color:" + color + "'>";
for (let i = 0, o = 0; i < numChunks; ++i, o += msgLength)
{
console.log(msgColor + msg.substr(o, msgLength) + "</div>");
}
}
}
}