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

question about comments

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
techman246



Joined: 27 May 2013
Posts: 46

PostPosted: Mon Jul 08, 2013 12:40 pm    Post subject: question about comments Reply with quote

how would you go about commenting out lines. Like in terminal its the # sign. I know about #nop but is their a better way?[/quote][/i]
Back to top
View user's profile Send private message
mrbigtaco



Joined: 26 Jun 2011
Posts: 54

PostPosted: Thu Jul 11, 2013 1:27 pm    Post subject: Reply with quote

you can use /* */ style code block comments for multi line, and #nop for single line. Both come with a disclaimer though, the lines that are commented out apparently aren't ignored by the file parsing consistency checker, so it looks to match brackets, etc without respect to whether the code is commented or not.

I haven't found a good way to add/remove blocks of code other than simply taking it out and pasting it into a temporary file while the issues are sorted out. If you want to comment out a whole block of code without any weird beginning/ending brackets unmatched within the code block, the /* */ style should work OK.
Back to top
View user's profile Send private message
techman246



Joined: 27 May 2013
Posts: 46

PostPosted: Thu Jul 11, 2013 6:50 pm    Post subject: Macros and messages Reply with quote

How would I go about getting a macro ro read the last line of the scrollback buffer?
For example if someone said something and you missed it you could hit like F2 to repeat it
Back to top
View user's profile Send private message
mrbigtaco



Joined: 26 Jun 2011
Posts: 54

PostPosted: Mon Jul 15, 2013 9:48 am    Post subject: Reply with quote

Did you try the page up / down buttons?

There's a couple ways to check for things in the history... #grep will search (optionally by page). You can also use #buffer command to dump the history into a log file that you can then check.

I can't remember off the top of my head how to grab the scroll into a variable (but I know someone has posted an example, somewhere)... I'd think that approach might just end up being cumbersome and clunky compared to the previous 3 suggestions.
Back to top
View user's profile Send private message
techman246



Joined: 27 May 2013
Posts: 46

PostPosted: Mon Jul 15, 2013 12:07 pm    Post subject: reasoning Reply with quote

The reason I ask is because in another client called vipmud when u recieve messages by certin criteria it stores it in F2 until the next one comes in. Then the old one gets stored in F3 the new one gets stored in F2 and ir continues all the way until the oldest matching message is in F9 and the newest is in F2
Back to top
View user's profile Send private message
mrbigtaco



Joined: 26 Jun 2011
Posts: 54

PostPosted: Tue Jul 16, 2013 11:23 pm    Post subject: Reply with quote

Sounds like what you want to do is pretty straightforward... trigger the message text, store it into a list at the beginning (and optionally remove messages that exceed your history buffer at the end of the list), and then set up #macro keys for each of your F2 and onwards buttons to get the corresponding index from the list and #echo the contents of the var to the screen.

Tintin doesn't support that out of the box as standard functionality- but it would definitely be possible to do what you've just described with a bit of glue (as outlined above).
Back to top
View user's profile Send private message
techman246



Joined: 27 May 2013
Posts: 46

PostPosted: Tue Jul 16, 2013 11:49 pm    Post subject: example please? Reply with quote

Could you write out a quick example or point me to one that has already been done?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat Aug 10, 2013 2:37 pm    Post subject: Reply with quote

You could use:

Code:

#event {RECEIVED LINE}
{
    #unvar {history[10]};
    #list {history} {insert} {1} {%1};
}

#macro {\eOP} {#line ignore #showme {$history[1]}}
#macro {\eOQ} {#line ignore #showme {$history[2]}}


Use %0 instead of %1 if you want color codes added.
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 -> General Discussion 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