I've been setting up triggers to paste channels to a notpad window so that if I'm busy fighting and miss a message it's in another window to find instead of having to wade through scroll back. I'm familiar with vba to a certain extent but keep running into errors. The last channel I'm trying to get to append only shows a person's name and what s/he said.
the only problem with doing a match on <*> * is that's also the format for most of the other prompts in game
The one thing I do know is the line for that channel will never start with <[, so I tried doing a check but I keep getting an error I don't quite follow.
Here's what I've been trying:
and the error I got as this:
I tried adding in an extra ) at the 33rd character but that also didn't fix the issue, is there a way to make this script work? Also I think another issue here is not quite understanding replace and len as I've only really used those in excel/vba/ms office, is it possible to replace characters within a script the way i'm attempting to and then calculate the length of the string?
<Name> the message that was sent
the only problem with doing a match on <*> * is that's also the format for most of the other prompts in game
<[892X] [7835H 13M] [14 Blood]>
The one thing I do know is the line for that channel will never start with <[, so I tried doing a check but I keep getting an error I don't quite follow.
Here's what I've been trying:
if len(world.replace(%1,"[","")) = len(%1) Then
world.AppendToNotepad "Trigger", %0
end if
and the error I got as this:
Execution of line 1 column 33
Immediate execution
Expected ')'
Line in error:
if len(world.replace([Crippled] [7835H 13M] [14 Blood],"[","")) = len([Crippled] [7835H 13M] [14 Blood]) Then
I tried adding in an extra ) at the 33rd character but that also didn't fix the issue, is there a way to make this script work? Also I think another issue here is not quite understanding replace and len as I've only really used those in excel/vba/ms office, is it possible to replace characters within a script the way i'm attempting to and then calculate the length of the string?