Skip to content

Capture Groups

Adam Keenan edited this page May 16, 2026 · 3 revisions

Capture groups can make your alerts dynamic by changing the output depending on what triggered the alert.

Any trigger with a text input can use {} to create a capture group around the text inside it. You can then use the captured text in your alert output by writing $1. Multiple brackets can be read sequentially with $2, $3 etc. This is useful when using glob glob, since the text that was globbed can now be captured with {*}.

Say you have a Notification Fired Alert with the Message set to Your {*} is ready to harvest in {*}. You could then have a TTS notification set to Go get your $1 in $2! which would make it say something like Go get your Ranarr in Ardougne!.

Another useful output is as the file name for a sound notification. With the above example, we could set the alert to play $1.wav, which would actually play other files in the same folder such as ranarr.wav and torstol.wav. To set this up, you have to include and select a dummy file $1.wav in the folder with the files you wish to use, even though the file itself will not be played.

With regex enabled, you instead use parenthesis () to surround the text you wish to capture.

Clone this wiki locally