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

If command comes from shell, TT ignores it.

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Chicomecoatl



Joined: 08 Sep 2009
Posts: 73
Location: Kansas

PostPosted: Sat Apr 23, 2011 7:37 pm    Post subject: If command comes from shell, TT ignores it. Reply with quote

Say for example i have this script:

Code:

#! /usr/bin/perl -w

print "Perl-SetVar: (tmp) (hasbeenset)";



and i have this action in tt++:

Code:


#act {Perl-SetVar: (%1) (%2)
{
    #var {%1} {%2};
}



and i call it via #sys {perl $perldir/test.pl}, it will indeed echo the print as show in the perl script, but tt++ will ignore it and won't set the specified variable.
_________________
Chico
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sat Apr 23, 2011 10:44 pm    Post subject: Reply with quote

#system works outside of the tt++ environment.

If you use #run you can create triggers within the #run session. #script is an option as well.
Back to top
View user's profile Send private message Send e-mail
goofy



Joined: 24 Mar 2008
Posts: 164

PostPosted: Thu Aug 01, 2013 1:23 am    Post subject: Reply with quote

here's an example:

Code:
#script {path} {tmux -V};
#show {$path};
#act {tmux 1.5} {#showme hello world!};
Back to top
View user's profile Send private message
mrbigtaco



Joined: 26 Jun 2011
Posts: 54

PostPosted: Fri Aug 02, 2013 1:16 am    Post subject: Reply with quote

goofy wrote:
here's an example:

Code:
#script {path} {tmux -V};
#show {$path};
#act {tmux 1.5} {#showme hello world!};

Just for the sake of sanity, pointing out that in this example the #action should come before the #show {$path}. As written, while it may work, it doesn't make much sense (you're showing text, and then afterwards adding a trigger against something that already happened- you could just as well do a #var path to view the contents of the variable). Also, it probably wasn't necessary to post the identical example in multiple forums on threads that are anywhere from 2-7 years old... that's called cross posting and "necroing" since it brings back to life discussion that has long been dead. Both practices are considered undesirable- starting one new thread in an appropriate forum is generally preferable if it's new discussion and not relevant to an existing one, but in some cases the old thread is still the most appropriate place.

As Scandum pointed out though, in general #run is for scripts that you may have ongoing back and forth processing. If you have a script that you want to invoke once with or without some parameters and then capture the contents of the output (or not), you're likely wanting #script. #run functions as an additional session which you can switch between or pipe input to/from using the standard session switching functionality. keyboard input and/or text that gets sent to the session is considered as input to the script, and you can make actions against the output of the script as if it was coming from a mud.
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 -> Bug Reports 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