beautypg.com

Objexec – Visara Master Console Center Scripting Guide User Manual

Page 151

background image

Chapter 5 Script Commands

Scripting Guide

151

OBJEXEC

Syntax:

OBJEXEC( %ObjID, $Action[, Parms...]) ==> %ReturnValue

Description:

Executes an action on an object.

Action:

The action specified by the Action parameter is performed on the object

specified by ObjID.

Parameters:

%ObjID. Numeric expression. The ID of the object to perform an

action on. Refer to Object ID on page 26 for more information.
$Action. String expression. The action to perform on the object. Valid

actions are WAIT, WAITCHILD, WAITQUEUE, and

WAITQUEUCHILD. Refer to Object Action on page 27 for further
information.
Parms. Numeric or string expressions. The optional and/or required
parameters depend on the specified Action. Refer to Object Action on

page 27 for further information.

Returns:

Numeric or string value. The return value depends on the specified
Action. Refer to Object Action on page 27 for further information.

Notes:

Use OBJEXEC() to monitoring tasks on an OS. Once the task list is set
up in a script, OBJEXEC can be set on the OS to wait until a change

occurs on one of its child objects. The script can then make an

appropriate response.

Example:

// In this example script segment, ‘%OSObjID’ contains the
// ID of the OS you want to monitor. The return value
// ‘TaskObjID’ will be the object ID of the child which
// has changed.
%Wait := 3
WHILE TRUE

%TaskObjID := OBJEXEC(%OSObjID, WAITQUEUECHILD,

%Wait)

IF %TaskObjID > 0

// Take appropriate change actions.

ENDIF
ENDWHILE

See Also:

OBJGET, OBJGETARRAY, OBJID, OBJIDARRAY, OBJSET,
OBJSETARRAY