Support Forums

Does PrimalScript have a JavaScript console?

Support for all customers who have purchased a PrimalScript product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
rodriguennr
Posts: 5
Joined: Sun Sep 27, 2015 2:11 am

Does PrimalScript have a JavaScript console?

Postby rodriguennr » Mon Jan 18, 2016 3:52 pm

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.
User avatar
Alexander Riedel
Posts: 5857
Joined: Tue May 29, 2007 4:43 pm

Re: Does PrimalScript have a JavaScript console?

Postby Alexander Riedel » Tue Jan 19, 2016 1:09 am

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/
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
rodriguennr
Posts: 5
Joined: Sun Sep 27, 2015 2:11 am

Re: Does PrimalScript have a JavaScript console?

Postby rodriguennr » Tue Jan 19, 2016 1:57 pm

This has been fixed with the settings from the following forum:
viewtopic.php?f=11&t=9636&p=52195#p52195

Thank you.

Return to “PrimalScript”

Who is online

Users browsing this forum: No registered users and 1 guest