BBShelp 版 (精华区)

发信人: zhili (北侠), 信区: BBSHelp
标  题: 有关制作签名档(转编) (转载)
发信站: 紫 丁 香 (Sun Aug 10 15:58:53 1997)

【 以下文字转载自 sysop 讨论区 】
【 原文由 dxtl 所发表 】
发信人: netman (网人), 信区: ASCII
标  题: ANSI概览----制作签名档必度(1)
发信站: 北国开心天地 (Sun Oct 27 20:24:50 1996)

    BBS支持ANSI/3.64控制码标准,ANSI控制码均以 Esc[ 作为控制码的
开始标志,清华BBS中ESC字符的输入方法是[ESC]+[ESC],在编辑器中用
"*"代表。DOS支持大部分ANSI控制码,在DOS下使用请看 c:>help ansi.sys。
下面先介绍DOS支持的部分ANSI控制码。

DEVICE=ANSI.SYS
设置显示属性
   *[0m  关闭所有属性
   *[1m  设置高亮度
   *[4m  下划线(仅限单显 )
   *[5m  闪烁
   *[7m  反显
   *[8m  消隐
   *[30m ---- *[37m  设置前景色
   *[40m ---- *[47m  设置背景色
   注:*[Ps;...;Psm  参数Ps可连续设置

光标控制
   *[nA  光标上移n行
   *[nB  光标下移n行
   *[nC  光标右移n行
   *[nD  光标左移n行
   *[y;xH设置光标位置
   *[2J  清屏
   *[K   清除从光标到行尾的内容
   *[s   保存光标位置
   *[u   恢复光标位置

注意: 控制符大小写
      请到 Test 板试验这些控制码的用法
      文章贴到板上后,请先看一下实际效果,可以按"E"重新编辑修改。

    BBS支持ANSI/3.64控制码标准,ANSI控制码均以 Esc[ 作为控制码的
开始标志,清华BBS中ESC字符的输入方法是[ESC]+[ESC],在编辑器中用
"*"代表。DOS支持大部分ANSI控制码,在DOS下使用请看 c:>help ansi.sys。
下面介绍DOS不支持的部分ANSI控制码。
           ^^^^^^
光标控制(2)
      *[y;xf     设置光标位置(现已很少使用)
      *[nL       在光标行前插入n行              (NANSI)
      *[nM       删除包括光标行在内的n行        (NANSI)
      *[n@       在光标处插入n个空白字符        (NANSI)
      *[nP       删除包括光标位置在内的n个字符  (NANSI)

注:全部ANSI/3.64控制码标准见文章“ANSI/3.64”

    做活动签名档就要掌握ANSI光标控制码,原理和动画制作一样。

    签名档有六行的行数限制,清华BBS目前的每行字符限制在240左右,
  因而一个签名档总共可使用大约1320个字符。

    由于字符数限制和控制手段的缺乏,复杂的活动签名档很难见到。


    签名档的设计很重要,能灵活运用彩色、汉字图符、适当的闪烁和移
  位,静态签名档就可以达到很好的效果。这也是我们在BBS上见到的绝大部
  分签名档的情况(WWW的BBS除外)。

    新手做签名档的最佳途径是参考他人,由于BBS系统的缘故,通常看不到
  特殊签名档的控制码。这里有两条途径,一是看BBS的WWW版,如水木清华BBS;
  另一方法可以直接在Telnet时看,还可以把它拷下来,挪为己用。
--
              ANSI.SYS and NANSI.SYS Functions  -  ANSI x3.64

      ESC[y,xH     Cursor position y,x
      ESC[nA       Cursor Up n lines
      ESC[nB       Cursor Down n lines
      ESC[nC       Cursor Forward n characters
      ESC[nD       Cursor Backward n characters
      ESC[y;xf     Cursor position y,x (less frequently used)
      ESC[y;xR     Cursor position report y,x
      ESC[6n       Device status report (cursor pos)(n is constant 'n')
      ESC[s        Save cursor position
      ESC[u        Restore cursor position
      ESC[2J       Erase display
      ESC[K        Erase to end of line
      ESC[nL       Inserts n blank lines at cursor line.   (NANSI)
      ESC[nM       Deletes n lines including cursor line.  (NANSI)
      ESC[n@       Inserts n blank chars at cursor.        (NANSI)
      ESC[nP       Deletes n chars including cursor char.  (NANSI)
      ESC[n;ny     Output char translate                   (NANSI)
                   When first char is encountered in output request, it
                   is replaced with the second char.  When no parameters
                   are given, all chars are reset.
      ESC["str"p   Keyboard Key Reassignment. The first char of str gives
                   the key to redefine; the rest of the string is the
                   key's new value.  To specify unprintable chars, give
                   the ASCII value of the char outside of quotes, as a
                   normal parm.   IBM function keys are two byte strings.

                   Ex:  ESC[0;";dir a:";13;p

                   redefines F1 to have the value "dir a:" followed by CR.
                   If no parameters given, all keys are reset to their
                   default values.  Single or double quotes are valid.

      ESC[n;n;...nm  Set Graphics Rendition is used to set attributes as
        well as foreground and background colors.  If multiple parameters
        are used, they are executed in sequence, and the effects are
        cumulative. 'n' is one of the following attributes or colors:

        0  All attributes off       5  Blink
        1  Bold                     7  Reverse Video
        2  Dim                      8  Invisible
        4  Underline

      Foreground colors          Background colors

         30  Black                  40  Black
         31  Red                    41  Red
         32  Green                  42  Green
         33  Yellow                 43  Yellow
         34  Blue                   44  Blue
         35  Magenta                45  Magenta
         36  Cyan                   46  Cyan
         37  White                  47  White


      ESC[=nh     Set mode (see screen modes for n)
      ESC[=nl     Reset Mode (see screen modes for n)


          Screen modes are similar to those found in the IBM BIOS:

             0   text 40x25 Black & White
             1   text 40x25 Color
             2   text 80x25 Black & White
             3   text 80x25 Color
             4   320x200 4 bits/pixel
             5   320x200 1 bit/pixel
             6   640x200 1 bit/pixel
             7   cursor wrap
            13   320x200 4 bits/pixel (EGA)
            14   640x200 4 bits/pixel (EGA)
            16   640x350 4 bits/pixel (EGA)


     - for more information see ANSI document x3.64 or DOS manual


--
※ 来源:·哈尔滨紫丁香站 bbs1.hit.edu.cn·[FROM: dxtl.bbs@ncc02.neau.] 
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:4.215毫秒