Alias with agument

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

Alias with agument

Post by Talkslowtome » Sun Jun 21, 2015 12:48 am

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: 412
Joined: Thu Apr 19, 2012 1:36 am

Re: Alias with agument

Post by Akaya » Sun Jun 21, 2015 4:02 am

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 » Sun Jun 21, 2015 8:08 pm

Thank you!!!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests