TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Use %0 for trigger name?

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
atraeyu



Joined: 12 Dec 2007
Posts: 165

PostPosted: Thu Mar 06, 2014 3:54 pm    Post subject: Use %0 for trigger name? Reply with quote

When working in most shell environments, %0 is used to the the name of the script:

Code:

#!/usr/bin/env bash

echo \$0: $0
echo \$1: $1
echo \$2: $2


Quote:
./test.sh one two $0: ./test.sh
$1: one
$2: two


Is there any possibility of having the name of a trigger passed into a trigger?
This would allow for doing things like:

Code:
#alias {myAlias}
{
    #var ${%0}[localVar] value;
    ...
    #showme My local variable: ${%0}[localVar];
}
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Mar 06, 2014 8:14 pm    Post subject: Reply with quote

%0 holds all the arguments passed to an alias, and you know the name of the alias because it's static.

You can capture manual input with the RECEIVED INPUT event.

Too much work to add local variable support unfortunately.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group