-
-
Notifications
You must be signed in to change notification settings - Fork 24
Capture Groups
With glob patterns (or regex) and capture groups you can make your notifications dynamic. Using glob patterns you wrap
the text you want in curly braces {}
and in regex you use parenthesis ()
.
Say you have a Notification Fired Alert with the Message set to Your {*} is ready to harvest in {*}
.
This will capture the crop and the location which you can then use in your notifications.
In message type notifications like Text to Speech, Tray Notification, or Game Message you can use those
capture groups to create your own message.
For example, you could 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!
.
You can also use capture groups in a Sound Notification to create a dynamic file path. It's a little tricky since you
have to have a dummy file that has the capture group values in the name so that the path can be read with the variables.
But if you select a file with the name $1.wav
for example you can then have other files in the same directory like
ranarr.wav
and torstol.wav
to have unique sounds for different herb types.