Been having a look at the new functions in VerbotStandard.vcm.
I've used the following code to determine what action led to the rule being fired (whether it was user input, send, startup or other). I think this works, but is not tested much. Not sure if other is useful (I have it there for testing).
This also requires additional functions in the vcm, as shown in the code below. The code goes in OnBeforeRuleFired function.
If there is a simpler way of doing it this, would be happy to know. Otherwise, hope this is useful.
Note: probably c# can use elseif. If so this code could be shorter.
- Code: Select all
string inputvar = s.Vars["_input"].ToString();
string lastinputvar = s.Vars["_lastinput"].ToString();
if (lastinputvar == "")
if (inputvar == lastinputvar)
if (inputvar != "")