IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Wildcards for something other than a word, For instance, A* * *Z
Lori
post Jun 8 2004, 08:49 PM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 8-June 04
Member No.: 45



This is something I've been messing with now and then in Savitar for quite some time. Seems like it should be something that can be done, but I'm the first to admit I'm not the best macro/trigger author around. smile.gif

Anyway, I'd like to be able to look at three consecutive words in a given string. If the first letter of the first word is A and the last letter of the third words is Z, then I'd like the trigger to do something. Doesn't matter what the second word is at all, and it doesn't matter what the characters are following the A or preceeding the Z.

I've tried to use the "Match it exactly as it is found" as well as "Match the whole line it was found in" methods and this is what I've used:

A$$ $$ $$Z $$

It ignores the Z, though, and triggers the event regardless of what follows the A.

Perhaps this is something I need to figure out the "Match: Regular Expression" for?
Go to the top of the page
 
+Quote Post
Guest_Axl@Alter Aeon_*
post Jun 17 2004, 05:57 AM
Post #2





Guests






I wouldn't use those two variables with no names attached to them. That would make Savitar label the 2nd word as a trigger with no name, then immediately it would replace that variable with the 2nd $$.

If you want it to match the entire line, make sure you click the 'line starts with' checkbox in the edit trigger window, and the trigger would look like:

A$$1 $$2 $$Z

If you don't care what those words are, or if you don't even want to recall any or all three of them, but just have something else fire off, then when the above trigger script successfully fires, I guess attach a trigger for %%Z, since that's the end of the trigger, it has the final say on whether or not the trigger is successful or (i.e. A$$ $$2, with absolutely nothing after the $$2 but a carriage return).

What was your closing $$ for?

But then to call it into action...i guess it would be:

say %%1 %%2 %%Z

That would be to just recite back to the world (or whoever's in the room, at least) what those strings were. But wouldn't the ends of your lines end with a period (.)? Perhaps you should be looking for Z.

I'm glad I read this, becuase I completely forgot about the 'Match Regular Expression' option...would be nice if there's some help written for this.

This just brings up more questions for me, though. Because I've had triggers bring back handfuls of words, not just single ones. I don't think the space between them tells savitar to cut the variable off at that space.

Ugh, I'm tired of thinking and am gonna stop now.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 23rd May 2024 - 04:14 PM