CREATE_OBJECT

Use the CREATE_OBJECT script function to create objects. The function lets you specify the object type, name of the object and folder in which to create the object. You can create the following types of objects with this script function:

Syntax

Calendar and Login objects:

CREATE_OBJECT (Object Type, Object Name, [Folder], [Title] )

Static VARA objects:

CREATE_OBJECT (Object Type, Object Name, [Folder], [Title], [Error Handling], [Data Type], [Validity] )

Parameters

Notes:

Tip: Include lines in your script to define what happens when errors occur, and to help you analyze errors. For more information, see Script Elements for Error Handling.

Return Codes

The script function has the following return codes:

Examples

The following example creates a Calendar object that is called FIRM.CALENDAR2020 in <No folder>:

:SET &RET# = CREATE_OBJECT("CALE","FIRM.CALENDAR2020",,"Company calendar for 2020")

The following example creates a Login object that is called LOGIN.SMITH in <No Folder>:

:SET &RET# = CREATE_OBJECT("LOGIN","LOGIN.SMITH",,"Standard Logins")

The following example creates a Login object in a folder that is called LOGIN_DIR.

:SET &NEW# = CREATE_OBJECT("LOGIN","LOGIN.SMITH","LOGIN_DIR",)

The following example creates a VARA object for storing the retrieved number of files:

:SET &RET# = CREATE_OBJECT("VARA","OUTPUT.WEBHELP.VARA","VARIABLE/STATS","Number of Help Files","I","F","FREE")

See also:

seealso

Script Elements for Handling Tasks