Alias with agument

Post Reply
Talkslowtome
Posts: 21
Joined: Tue Jun 17, 2014 10:17 pm

Alias with agument

Post 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?

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Alias with agument

Post 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.

Talkslowtome
Posts: 21
Joined: Tue Jun 17, 2014 10:17 pm

Re: Alias with agument

Post by Talkslowtome »

Thank you!!!!!

Post Reply