Grabbing Input

Post Reply
jklua
Posts: 22
Joined: Fri Jun 17, 2011 9:45 pm

Grabbing Input

Post by jklua »

How do I get at the last line of input I typed?

I want to write a little script that offers targeted aliases. So for example if I type "c thief" it replaces it with "con thief" instead of just "con."

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Grabbing Input

Post by Vadi »

^c (.+)$ as a regex, and send("con "..matches[2]) as the script should do it

jklua
Posts: 22
Joined: Fri Jun 17, 2011 9:45 pm

Re: Grabbing Input

Post by jklua »

Thanks, Vadi. I added "\s" after "^c". It's working great!
Last edited by jklua on Wed Jun 22, 2011 8:23 pm, edited 1 time in total.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Grabbing Input

Post by Vadi »

Capture the data

Post Reply