Create an IncludeScript
An IncludeScript may define a fragment of code or a complete ProcScript module. It is only compiled when the object that uses it is compiled. To create an IncludeScript, add it to an IncludeScript Library.
You must have created a project to contain your
application definitions. For more information, see Working with Projects.
-
Open your project. In the U-Bar, click
Browse, select
prj
, then choose the project you want to open. - If you have not already done so, create an
IncludeScript Library:
- In the Templates tab of the
Resource Browser, select the
IncludeScript library
template. - Drag and drop it onto the project in the Structure Editor.
- Rename the library.
- Optionally, edit the Description property to provide a more informative description.
- In the Templates tab of the
Resource Browser, select the
- Double-click the IncludeScript Library
(
libinc
) to open it, or right-click it and choose Open from the menu. - Drag and drop an IncludeScript template from
the Resource Browser onto the Library object in the Structure pane.
Uniface provides a default template called
Empty include
in the INCLUDE_TEMPLATES palette. - Rename the IncludeScript object and edit the Description property to provide more information about the IncludeScript.
- Go to the Write Script
worksheet, select the IncludeScript object, and edit its contents.
For more information, see Scripting Application Behavior .
To use the IncludeScript in your code, use the #include instruction to insert the script at the desired location.