scriptinggateway Scripting connector

Navigation:  Reference > Connector properties >

scriptinggateway Scripting connector

Previous pageReturn to chapter overview

Edit connector script


Click on the Edit C# Script or Edit Visual Basic .Net Script link to edit the script. Use the Compile button to check if the script has syntax errors. If the script uses functions that are not in the System.dll assembly, a reference to the required assembly DLL must be added in the ReferenceList of the Advanced properties.

 

EditConnector_Script

 

Advanced properties


LogCommunicationToFile

Log all trace log communication to file. You can use this option in combination with the PostTraceLog script function to debug your script. If enabled, the status windows of the Scripting connector provides a link to the location on the hard disk where the file is stored.

 

ReferenceList

A list of all assembly DLL's required by the script. For the skeleton script, only the System.dll assembly is loaded. Possible useful .NET assemblies are:

 

System.Web.dll

Classes for web or html functions.

System.Data.dll

Classes to handle database requests.

System.XML.dll

Classes to handle XML files.

 

Connector skeleton script


The connector skeleton script that is installed after adding the gateway makes it easier to handle events and provides a number of methods you can use to send messages and add log entries.

 

 

Events

 

OnMessageReceived is called when an SMS message is received.

 

OnSendMessageResult is called when a message result is received from a previously sent message.

 

OnSendMessageResultUpdate is called when a message result update was received.

 

Methods

 

PostSendMessage initiate sending an SMS message.

 

PostEventLog adds a line to the event log.

 

PostTraceLog Adds a line to the communication file.