To configure an event handler, follow these steps.
To configure an event handler
Set the OnStart
, OnFinish
, OnError
, or OnQueueEvent
parameter to specify the name of a section in the configuration file that contains the event handler settings.
To run an event handler for all asynchronous actions, set these parameters in the [Actions]
section. For example:
[Actions] OnStart=NormalEvents OnFinish=NormalEvents OnError=ErrorEvents
To run an event handler for specific actions, use the action name as a section in the configuration file. The following example calls an event handler when the Fetch action starts and finishes successfully:
[Fetch] OnStart=NormalEvents OnFinish=NormalEvents
OnStart
, OnFinish
, OnError
, or OnQueueEvent
parameter.In the new section, set the LibraryName
parameter.
LibraryName
|
The type of event handler to use to handle the event:
|
For example:
[NormalEvents] LibraryName=TextFileHandler FilePath=./events.txt [ErrorEvents] LibraryName=LuaHandler LuaScript=./error.lua
|