Connecting scripts with Mnova GUI

Top  Previous  Next

As you have seen in the examples above, you can insert any script in the Mnova Scripts menu, contextual menus or toolbars.

 

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):

 

// <GUI menuname= "MyProcess" shortcut="Ctrl+1" tooltip="Exponential 0.5" icon="C:/bin2.jpg" />

 

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 use any created image file as icon. In this case, the name of the script is MyProcess, the shortcut is Ctrl+1, the tooltip is Exponential 0.5 and the icon used was saved at C:/bin2.jpg.

 

You can see in the picture below, that we added the script ‘MyProcess’ to the ‘Legacy Scripts’ menu with the corresponding shortcut (Ctrl+1):

 

Script menu and toolbar

 

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 ‘MyProcess.qs’, because the name of the function is: MyProcess().