Action Properties and Methods

   

Action Properties and Methods

 

The Action object is passed into Script Events.  The methods and properties available on the Action object are as follows:

 

Procedure/Methods

procedure SetLogTitle(value As String)
procedure SendLogMessage(MessageText As String)
procedure Echo(MessageText As String)
procedure SendProgress(Value As String, progress As Integer)

 

Functions

function ExpandExpression(expr As String) As String
function ChildActions(index As Integer) As OleVariant
function Parent As OleVariant

 

Properties

ActionComment As String
ActionLogTitle As String
ActionName As String
ChildActionCount As Integer
Description As String
IgnoreFailure As Boolean
LogToVariable As String
PauseInterval As Cardinal
SuppressStatusMessages As Boolean

 

 

 

Detailed information on the procedures, functions and properties:

 

procedure SetLogTitle(value As String)

Allows you to set the title of the FinalBuilder log.

 

procedure SendLogMessage(MessageText As String)

Sends a message to the output window. Note that this will also trigger the OnStatusMessage event (except when called from within the OnStatusMessge event!

 

procedure Echo(MessageText As String)

Same as SendLogMessage (see above).

 

procedure SendProgress(Value As String, progress As Integer)

Sends a progress message to the Run Status window.  This enables the action to report it's progress as it's executing.  Progress is a percentage and should therefore range between 0 and 100.

 

function ExpandExpression(expr As String) As String

This expands the string passed in by substituting FinalBuilder variables when %<variable>% is encountered.

 

function ChildActions(index As Integer) As OleVariant

Allows access to child actions, index is zero based.  Use ChildActionCount property to get a count of the child actions.

 

Example : Turn off debug info on all child Delphi compiler actions... (in this example IncludeDebugInfo is a FinalBuilder variable) add this code to the BeforeAction event handler of the parent action (an action group for example).

 

dim child

dim count

dim i

 

count = Action.ChildActionCount - 1

 

for i = 0 to count

set child = Action.ChildActions(i)

if not (child is nothing) then

  if child.ActionName = "Compile Delphi Win32 Project" then

     child.CompilerOpt.DebugInfo = IncludeDebugInfo

  end if

end if

next

 

function Parent As OleVariant

Returns the Parent action of the current action.  This will return null for root level actions.

 

property: ActionComment As String

Provides access to the action comment.

 

property: ActionLogTitle As String

Allows you to change the title of the action's entry in the output window. Note that this has no effect if set from the AfterAction event (since the log entry has already been made.)

eg.

Action.LogTitle  = "Full Build - VB6"

Action.SendLogMessage("File deleted")

 

property: ActionName As String

Provides access to the Action's name

 

property: ChildActionCount As Integer

Returns the number of Child Actions the action has.

 

property: Description As String

Provides access to the Action's description

 

property: IgnoreFailure As Boolean

Provides access to the Action's IgnoreFailure flag

 

property: LogToVariable As String

Provides access to the Action's LogToVariable flag

 

property: PauseInterval As Cardinal

Provides access to the Action's PauseInterval property

 

property: SuppressStatusMessages As Boolean

Provides access to the Action's SuppressStatusMessages property