Page 1 of 1

Does PrimalScript have a JavaScript console?

Posted: Mon Jan 18, 2016 2:52 pm
by rodriguennr
Product, version and build: v7.1.74
32 or 64 bit version of product: 64bit
Operating system: Windows 10
32 or 64 bit OS: 64 bit

I was wondering whether PrimalScript has a JavaScript console which would display the results of my script. For example, the Mozilla firebug has a console which can be used with methods like console.log(), console.debug()...etc

Any attempt to use console.log or similar in a JavaScript code within PrimalScript returns the following error in the output window:

Microsoft JScript runtime error: 'console' is undefined

Does PrimalScript have a similar console or output module for JavaScript? If so, how do you call it in your JavaScript code. Is there an API? I am referring here to JavaScript and not JScript.

Unless I am proven wrong, it appears PrimalScript always uses the Microsoft JScript engine and I haven't yet found a way to successfully call another custom engine or interpreter. Whichever JavaScript interpreter I have tried to call in File > Options >Environment > Languages > JavaScript; PrimalScript will keep on using the Microsoft JScript Engine.

Re: Does PrimalScript have a JavaScript console?

Posted: Tue Jan 19, 2016 12:09 am
by Alexander Riedel
There is no specific console, as that is a feature related to the particular language engine. As for the JavaScript vs Jscript interpreter, I am offsite so I cannot check at the moment, but I will as soon as I am back.
Please provide specifics as to what you are trying to use.

In the meantime, you can just add whatever tool or interpreter you want to run your script with to the tools browser and tell it to capture the output.
See more info here:

https://www.sapien.com/blog/2013/04/18/ ... uage-here/

Re: Does PrimalScript have a JavaScript console?

Posted: Tue Jan 19, 2016 12:57 pm
by rodriguennr
This has been fixed with the settings from the following forum:
viewtopic.php?f=11&t=9636&p=52195#p52195

Thank you.