If you want a simple way of programmatically creating a one-shot trigger, here are two VBscript subroutines you can use which will generate a trigger with a random name that will delete itself upon firing.
You can then call OneShotTrigger with your pattern and the text you want to send as a response and not have to worry about the trigger waiting around to fire at inappropriate times.
THe above will greet bob the next time he connects, but not repeat if he disconnects and reconnects.
Sub OneShotTrigger(sPattern,sResponseText)
Dim iFlags,iRand
Randomize timer
iRand=int(32767*rnd(1)+1)
iFlags = eEnabled+eKeepEvaluating+eIgnoreCase+eTriggerRegularExpression+eExpandVariables+eReplace
World.AddTrigger "OneShot_"&iRand,sPattern,sResponseText,iFlags,-1,0,"","OnDeleteTrigger"
End Sub
Sub OnDeleteTrigger(sName,sOutput,aParams)
world.deletetrigger sName
End Sub
You can then call OneShotTrigger with your pattern and the text you want to send as a response and not have to worry about the trigger waiting around to fire at inappropriate times.
OneShotTrigger "Bob has connected.","say Hi, Bob!"
THe above will greet bob the next time he connects, but not repeat if he disconnects and reconnects.