Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Extracting variables from triggers for use in a script

Extracting variables from triggers for use in a script

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Crimson_mordum   (4 posts)  Bio
Date Wed 29 Mar 2006 11:17 AM (UTC)
Message
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
Top

Posted by Crimson_mordum   (4 posts)  Bio
Date Reply #1 on Wed 29 Mar 2006 11:21 AM (UTC)
Message
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
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 06 Apr 2006 09:29 PM (UTC)
Message
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


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,864 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.