Extracting variables from triggers for use in a script

Posted by Crimson_mordum on Wed 29 Mar 2006 11:17 AM — 3 posts, 12,482 views.

#0
once again im running into problems with not knowing how to script; im trying to set up a simple if then trigger, and i cant find anywhere in the scripting help files on how to work it.
basically, when i recieve

[Pl:70,796,988/70,796,988][Ki:34,108,300/67,940,259][Lp: 1088]

I want to send
Lp power

whenever the value for lp is greather then 100
#1
actually, a better way of putting it is...

[Pl:70,796,988/70,796,988][Ki:34,108,300/67,940,259][Lp: *]
if *>100
then execute lp power
Australia Forum Administrator #2
You want to take your prompt:


[Pl:70,796,988/70,796,988][Ki:34,108,300/67,940,259][Lp: 1088]


Change anything that might vary into wildcards:


[Pl:*][Ki:*][Lp: *]


Then do "send to script" and do your test. In this case the Lp value is wildcard 3, so you might say something like:


if %3 > 100 then
  Send "lp power"
end -- if