...
The element also becomes available in the Custom Elements with Scripts group on the Palette.
It is required to write a script for the element. Supported languages for the script are languages based on the ECMAScript (Javascript, QtScript).
To edit the script select the element on the Scene and either select Actions ‣ Edit script of the element in the main menu, use the Edit script of the element item in the context menu or click on the following button on the toolbar:
HTML |
---|
<center> <img src="/wiki/download/attachments/2097187/makingscript_connectionedit.png"/> </center> |
The Script editor dialog will appear:
HTML |
---|
<center> <img src="/wiki/download/attachments/2097187/makingscript_editor_connectiondialog.png"/> </center> |
...
As you can see there are predefined variables for the ports and the attributes in the script. The variables for the input slots begin with the “in_” prefix, variables for the output slots begin with the “out_” prefix. It is possible to load a script from a file (use the Used script field to do it).
For each supported data type UGENE provides a number of functions that can be used in the scripts.