|
Problems and Solutions>Scripts |
|
|
Suppressing the output of a Script |
|
|
Article #: |
0024 |
|
Contributor: |
Doug Simpson |
|
GF version: |
All |
|
Applies to: |
Scripts |
|
Last updated: |
December 19, 2001 |
Problem
The text formatting used in a Script (e.g., carriage returns) is inserted into a document at run time, when no output is required.
Description
When the Scripts.Select task is run, the FillPoints in the Script are executed and the results, together with the text formatting used in the Script (e.g. carriage returns, tabs, spaces, and any text that was typed) are displayed in the document.
You may not require any output in the document, though, when the Script is to be used purely for running complex FillPoints and storing the results in variables. As a result, the output of the Scripts.Select task needs to be suppressed.
Solution
Click here to view the solution.
To suppress the output of the Scripts.Select task insert a "~" (tilde) in front of the task.
For example:
%[~Scripts.Select("\Knowledge Base", "Function_1")] will run the Script called "Function_1" but suppress any output.
|
NOTE |
|
Even though the output of the Script is suppressed, the results that were stored in the variables are available for use elsewhere in the document. |
(See the GhostFill Scripting Language Guide for more information on the Scripts.Select task.)