ALP ScriptGen raw scripts
Raw scripts are plain scripts written in a particular Active Scripting language. They share the same object model as the ASP-like scripts. Raw scripts are not parsed as a "text with embedded scripts" thus the output of such kind of script is only the output made through explicit calls to the Response.Write or Response.BinaryWrite methods. If a complex HTML output is required Raw scripts can still be used by implementing some kind of template functionality (see Survey example samples\scriptgen\inquiry directory).

Raw scripts do not allow includes but they have an alternative - library files. these are script files written in the same language included before the processed script. Files are defined in the local alp.application file. Here is a sample section for raw scripts written in JScript (section is from the alp.application used in the survey example):

        { js-script: (CG.newObjects.ScriptGen)
            (int)EnableParentPaths=0
            (string)Library=lib\adoinc.js-inc
            (string)Library=lib\htmltml.js-inc
        } js-script;

The above section assumes that in the default alp.application there is a section for the js-script extension and other required parameters are inherited. If defining your extension full section will be required - like this:

        { js-script: (CG.newObjects.ScriptGen)
            (int)RequireAsynch=2
            (int)Timeout=60
            (int)IsScriptEngine=1
            (int)CheckThatFileExists=1
            (string)ScriptLanguage=JScript
            (string)Library=lib\adoinc.js-inc
            (string)Library=lib\htmltml.js-inc
        } js-script;

Raw scripts have specific record entries recognized by the ScriptGen content generator:

(string)Library - specifies the paths to the scripts to be included. If the value does not begin with "\" path is relative to the script executed. If the path begins with "\" it is relative to the site root. Library scripts are included in the order found in the configuration.

Sample:

One little "Hello world" script will be:

Response.Write("<HTML><BODY>");
Response.Write("<H1>Hello World from the raw scripts</H4>");
Response.Write("</BODY></HTML>");

See also: ScriptGen objects, ScriptGen configuration

newObjects Copyright 2001-2006 newObjects [ ]