Contact us

Where should scripts be saved?

We strongly recommend to create a folder to save the scripts and add this folder to the ‘Script Directories’ by following the menu ‘Edit/Preference/Scripting”:

This is very important to allow Mnova to find the scripts when starting in such a way that they can be added to the GUI of Mnova (e.g. Toolbars, Menus, etc). For example, type the following script:
function HelloWorld() { MessageBox.information(“Hello World”); }}
And save it in the scripts directory. Now close Mnova and open it again.

You will appreciate that the script is available in the menu bar. The key to get this working lies in the first line of the script (and of course, in the fact that Mnova can locate the script as it has been saved in the appropriate folder):

  //

This line is used to instruct Mnova about the name to be displayed in the scripts menu along with the keyboard shortcut and the text used as a tooltip. Please bear in mind that you can also use any created image file as icon. In this case, the name of the script is HelloWorld, the shortcut is Ctrl+1, the tooltip is Hello Worls and the icon used was saved at C:/bin2.jpg. Please bear in mind that the script file will need to have the same name that the function which you want to call, in this case the name of the script must be ‘HelloWorld.qs’, because the name of the function is: HelloWorld ().