|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu May 31, 2007 9:51 pm
New idea? |
Either a new predefined variable %pattern, which would be like %trigger, except only contain the part of the line that matched the trigger pattern.
Or a new command #CONCAT which would work alot like #SUB, but append the contents of its parameter to the matching text instead of replacing it. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu May 31, 2007 10:17 pm |
Perhaps this might be useful, but you can already emulate the %pattern behaviour by enclosing the whole pattern in brackets - %1 will then become the entire match. Similarly with #concat, since once you've got the trigger set up that way, it's pretty trivial to use #sub to do it for you.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu May 31, 2007 10:57 pm |
That only works if you don't have %1 defined within the pattern already.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu May 31, 2007 11:15 pm |
Well, no, all the other captures will just get bumped up a space. It's not too hard to make the number one more than it otherwise would be when you write the script.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu May 31, 2007 11:31 pm |
Aha, i didnt realize the anonymous variables could be nested like that.
What about a predefined variable %id (or some other method) that would return the ID (if defined) of a given setting from within the setting?
That way i could use: #SUB {%1 ~(%id~)} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu May 31, 2007 11:48 pm |
You mean the actual trigger id, the one used for #t+ and #t- and stuff? I'm not sure if there's really a need for a variable for that since it isn't normally changed once it's set - you can just include it in the script as a string.
|
|
|
|
|
|