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

Access command line arguments from within tintin++

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Unix Shell
View previous topic :: View next topic  
Author Message
dolphy



Joined: 09 Apr 2014
Posts: 9

PostPosted: Mon Apr 21, 2014 2:12 pm    Post subject: Access command line arguments from within tintin++ Reply with quote

Is there a way to access command line arguments from within tt++?

For instance:

Code:

tt++ session.tin 10.20.30.40

#var {host} {$2}


I'd like to be able to pass in information to the tintin shell which I can act on generically.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Apr 21, 2014 6:26 pm    Post subject: Reply with quote

You could use:

tt++ -r session.tin -e "#var host 10.20.30.40"

Can also within session.tin use:

Code:

#event {SESSION CONNECTED}
{
    #var host %1
}


No way to access the actual arguments, but load an alias and call it with -e
Back to top
View user's profile Send private message Send e-mail
dolphy



Joined: 09 Apr 2014
Posts: 9

PostPosted: Tue Apr 22, 2014 10:41 am    Post subject: Reply with quote

This works perfectly, thanks!

Code:

tt++ session.tin -e "#var host 10.20.30.40"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Unix Shell 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