|
m59gar Beginner
Joined: 19 Aug 2021 Posts: 14
|
Posted: Mon Dec 11, 2023 10:17 am
How do I expand a variable within #TRIGGER's patterns and commands? |
So, trying to use #TRIGGER to create triggers, it takes everything literally. What I want to do is something like this -
I have a variable called @PatternText and a variable called @CommandText
I want to #TRIGGER {@PatternText} {@CommandText}
But when I do this, the trigger is *literally* @PatternText, triggering literally @CommandText, which is of course useless. I want the contents of those variables to make up the pattern and commands. How do I do that? |
|
|
|
chaossdragon Apprentice
Joined: 09 Apr 2008 Posts: 168
|
Posted: Thu Dec 14, 2023 4:38 am |
using () should expand the variable if i recall correctly... but why you want todo this escapes me.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Thu Dec 14, 2023 5:37 pm |
To use a variable in the pattern just wrap the variable in an extra set of curly brackets.
#TR {test pattern looking for a member of ({@stringList})} {#SAY %1 is the specific item in the list}
You are likely experiencing an issue of the command line evaluating your variables. This can be alieviated by making/editing your triggers via the GUI. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|