|
aslanthekat Novice
Joined: 17 Sep 2007 Posts: 44 Location: Missouri
|
Posted: Thu Jul 01, 2010 2:13 pm
Trigger Help: List in Pattern |
I have a pattern {one|two|three|four} and I want whichever of those 4 that triggers the trigger to be stored in a variable. Something like
Code: |
#ONINPUT {{one|two|three|four}} {#var triggerer WhateverMatchedGoesHere} |
and the triggerer variable would be either one, two, three, or four. I am going to type one two three four, so it'll have to be #ONINPUT I think, instead of #TR.
Thanks in advance for the help |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Jul 01, 2010 3:56 pm |
Code: |
#ONINPUT {^({one|two|three|four})$} {#VAR triggerer %1} |
Plain and simple. You also want to have the anchors (^ and $) so that it matches only at the beginning and end of a line. If you're needing to type 'one five six', then get rid of the $, but having the ^ will prevent the oninput from firing when you're typing things like 'Hey, it's a quarter to one now!'
Charneus |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|