User Control Panel
Advertisements

HELP US, HELP YOU!

Tk::CodeText::Alpha

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Modules & Add-ons
View unanswered posts
Author Message
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Sat Feb 19, 2005 10:51 pm    Post subject: Reply with quote

NAME

Tk::CodeText::Alpha - a plugin for Chatbot-Alpha syntax highlighting.

SYNOPSIS

Code:
 use Tk::CodeText::Alpha;<br /> my $sh = new Tk::CodeText::Alpha ($textwidget, [<br />   ['Text'],<br />   ['LabelOP', -foreground => '#00AAAA'],<br />   ['LabelCL', -foreground => '#008888'],<br />   ['Pattern', -foreground => '#FF0000'],<br />   ['Reply',   -foreground => '#0000FF'],<br />   ['Forward', -foreground => '#FF9900'],<br />   ['Code',    -foreground => '#888888'],<br />   ['Hold',    -foreground => '#000099'],<br />   ['If',      -foreground => '#990099'],<br />   ['Comment', -foreground => '#FF8888'],<br /> ]);


DESCRIPTION

Tk::CodeText::Alpha is a plugin module that provides syntax highlighting
for Chatbot::Alpha response files to a Tk::CodeText text widget.

It inherits Tk::CodeText::None. See also there.

METHODS

Quote:
highlight ($string);

Returns a list of string snippets and tags that can be inserted
in a Tk::Text like widget instantly.

syntax

Returns 'Alpha'.


AUTHOR

Cerone J. Kirsle (cjk @ aichaos.com)

BUGS

No known bugs at this moment.
_______________________________

This module is for syntax highlighting of Chatbot::Alpha response files. Here's an example using the default highlight colors:

Quote:
// Chatbot::Alpha Syntax Test

+ hello bot
- Hello, human!
- Hey! What's up?


+ hello
@ hello bot

+ what is 2 plus 2
- 500 Internal Error.
# $reply = "2 + 2 = 4";

+ knock knock
- Who's there?
& who?
& Ha! ! That's a good one!


+ am i your master
* if master = 1::Yes, you are my master.
- No, you're not my master.

+ f *lazy*
- You're very rude! Now apologize!{topic=apology}

> topic apology
+ *
- No, not until you apologize!

+ sorry
- Alright--I'll forgive you!{topic=random}

< topic


I'm going to include this into CPad for its next release (can't say when that will be).

The module is attached.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Modules & Add-ons All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group