Does PrimalScript have a JavaScript console?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 8 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
rodriguennr
Posts: 5
Last visit: Fri Jul 06, 2018 6:46 am

Does PrimalScript have a JavaScript console?

Post 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.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Does PrimalScript have a JavaScript console?

Post 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/
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
rodriguennr
Posts: 5
Last visit: Fri Jul 06, 2018 6:46 am

Re: Does PrimalScript have a JavaScript console?

Post by rodriguennr »

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

Thank you.
This topic is 8 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.