Rieschiek wrote: ↑09 Dec 2022, 12:26
Thanks for your prompt response. I don't understand how this will ignore if it contains "messaged you", what does the exclamation mark do?
~= used to determine whether a string contains a pattern (regular expression).
\Q...\E used to treat a needle as a literal text.
! is a negation symbol. Example
!1 = 0 &
!0 = 1 also
!True = False &
!False = True (
Not and
! are the same,
Not True = False also correct)
So if
results contains
"messaged you" or
"Finds this text in file",
(results ~= "\Qmessaged you\E|\QFinds this text in file\E") should return
True (or
1).
But we want to
GoSub trigger1 in the opposite case, so I added a
! to invert the result and puted it in
We_Should_Go which I used later in
If (We_Should_Go) or
If (We_Should_Go = True).