Transmitting Triggers

Triggers change the display or operation of an enhancement on the client. For example, a trigger can display new content in a frame or a new base page. Triggers are also used to initialize data reception. For a list of the types of triggers you can transmit, see Enhancement Triggers.

The ipsend object provides three types of methods that you can use to transmit triggers. The first type, ipsend.SendEvent parses an event and transmits it. The second type, ipsend.SendTrigger, accepts a pre-formatted trigger string as the input parameter. You can use SendTrigger or SendEvent to transmit any of the trigger formats described in Enhancement Triggers.

The third type of method accepts trigger data and formats the string for you. This includes the methods: ipsend.TriggerCAB, ipsend.TriggerFTS, ipsend.TriggerNavigate, and ipsend.TriggerScript. Each of these methods transmits a particular type of trigger.

You can use SendEvent, SendTrigger, or the TriggerXxx methods to transmit a trigger to the client. Choose whichever is most convenient for your application. Note that the ipsend.TriggerXxx methods cannot transmit TVCrossover triggers or user triggers. To transmit these types of triggers you must use ipsend.SendTrigger or ipsend.SendEvent.

The following example illustrates how to use ipsend.SendEvent to transmit the event stored in the EnhEvent object, e.

isend.SendEvent e
 

The following examples use SendTrigger to transmit a trigger.

'Transmit the trigger stored in event e
'(For triggers, EnhEvent.Name contains the trigger data and 
' EnhEvent.Trigger contains the trigger key.)
isend.SendTrigger e.Trigger + e.Name
 
'Transmit triggers using hard-coded data.
isend.SendTrigger "1 <CAB>Show.cab"
isend.SendTrigger "1 <FTS>123.32.111.98:198&MyShow&60"
 

The next examples demonstrate how to transmit triggers using the TriggerXxx methods.

isend.TriggerCAB "Show.cab"
isend.TriggerFTS "123.32.111.98", 198, "MyShow", 60
isend.TriggerNavigate "MyEnh.htm", "Left"
isend.TriggerScript "MsgBox ""Hello World!""", "VBScript"
 

When ipsend transmits a trigger, it automatically calculates the checksum value and adds this to the trigger string that it transmits. This value is used by the client to verify that the trigger is valid. If your application transmits the trigger by some means other than ipsend, it must calculate and add this value to the trigger string. For more information, see Trigger Checksum Value.