Page 1 of 1

Alias with agument

Posted: Sun Jun 21, 2015 12:48 am
by Talkslowtome
Aliases are easy. Even I have figured it out. But what if you want to alias things that have various targets? How would I do that?

For instance let's say I have aliased od to Open Door, what if I want to be able to Open door N or open door shiny? Is that possible?

Re: Alias with agument

Posted: Sun Jun 21, 2015 4:02 am
by Akaya
Why yes it is!

Pattern: ^od (\w+)$

Script: send("open door "..matches[2])

The (\w+) is a wildcard that will catch any word after od

You can use (\d+) for numbers and (.*) will match anything.

Re: Alias with agument

Posted: Sun Jun 21, 2015 8:08 pm
by Talkslowtome
Thank you!!!!!