标 题: [教程]个人说明档的几个话题
发信站: BBS 水木清华站 (Sun Feb 23 00:19:36 2003), 转信
以下的说明均以水木清华bbs为例,其它bbs可能有出入。
个人说明档是什么东西?个人说明档是查询网友时候出现在一串个人信息之后
的东东,它和签名档类似,都是比较个性化的。但它比签名档有更的施展空间,有
16行,大半个屏幕,一般足够施展了。
但是有时候还觉得不好,想全屏幕显示说明档,这就需要特殊的处理了。下面
分别说明:
首先是 *[2J ,它的作用是清除屏幕上的字符,并且把光标移到左上角。您现
在已经有了全屏显示的基础,之后就可以写自己的说明档了。
随之而来了另一个问题:说明档只有16行,而全屏有24行,简单的直接写说明
档会感觉半截子,不好看。所以我们有需要下面四个控制符:
*[A *[B *[C *[D
它们可以相对光标当前位置来控制光标的移动,*[A 是下移一行,*[B 是上移
一行,*[C 是右移一列,*[D 是左移一列。如果需要移动的大于一行或一列,可以
在字母前面加数字,比如上移3行就写 *[3B。
有了这四个控制符,我们可以在一行中写出显示成两行或更多行的内容。具体
例子我就不写了,请大家自己摸索吧。这样经过适当的调整,就可以用16行写出显
示成全屏的说明档了。
但是全屏显示的说明档有个毛病,就是这个人一些信息看不到了(虽然你可以
通过聊天室里的查询来看),有些人喜欢隐藏,有些人不喜欢隐藏的。不喜欢隐藏
的人(比如说我,您可以查询看看我的说明档是什么样子的)又想画大概全屏显示
的说明档,当然可以借助前面讲的方法来实现(不要*[2J清屏,还要注意第一行最
好不要画东西)。不过这里面还有一小点点的问题!
不知道您注意过没有,在线和不在线时个人信息显示的行数是不一样的!所以
当你在线和不在线时显示的说明档位置有差别。这时候您需要新的控制符了
*[m,nH
这是将光标的绝对定位的控制符,定位在第m行,第n列。有了它,您就可以精
确控制您说明档的显示了。上面提到的问题也就解决了。
上面介绍的几个控制符的应用还有很多,比如花里胡哨的昵称、超过6行的签
名档、精简复杂代码……具体的办法可以自己总结,我有机会的可能也会讲讲。
掌握的代码 *[2J *[A *[B *[C *[D *[m,nH
Title: [Tutorial] Several topics for personal description files
Sending station: BBS Shuimu Tsinghua Station Sun Feb 23 00:19:36 2003, forwarded
The following instructions are based on Shuimu Tsinghua BBS as an example. Other BBS may have differences.
What is a personal description file? A personal description file appears after a string of personal information when querying netizens.
It is similar to the signature file, both are more personalized, but it has more room for display than the signature file.
16 lines, half the screen, is generally enough to perform
But sometimes I still feel bad. I want to display the description file in full screen, which requires special processing as follows.
Explain separately
The first is *[2J. Its function is to clear the characters on the screen and move the cursor to the upper left corner. You are now
After you have the foundation for full-screen display, you can write your own description file.
Then came another problem. The description file only has 16 lines, while the full screen has 24 lines. Simply write the description directly.
The file will feel half-assed and unsightly, so we need the following four control symbols.
*[A *[B *[C *[D
They can control the movement of the cursor relative to the current position of the cursor *[A is to move down one line *[B is to move up
One row *[C means moving one column to the right *[D means moving one column to the left. If you need to move more than one row or column, you can
Add numbers in front of letters. For example, if you move up 3 lines, write *[3B
With these four control characters, we can write content that appears in two or more lines in one line. Specifically
I won’t write any examples. Please try it out for yourself. In this way, after appropriate adjustments, you can write an obvious example in 16 lines.
Displayed as a full-screen help file
But there is a problem with the full-screen description file. Some information about this person cannot be seen. Although you can
Judging from the queries in the chat room, some people like to hide. Some people don’t like to hide. Don’t like to hide.
For people like me, you can check to see what my description file looks like. If you want to draw it, it may be displayed in full screen.
Of course, you can use the method mentioned above to realize the description file. Do not *[2J clear the screen. Also pay attention to the first line of the
It's better not to draw anything, but there is still a little problem here.
I don’t know if you have noticed that the number of rows of personal information displayed is different when online and offline. So
There is a difference in the location of the help file displayed when you are online and when you are not online. At this time, you need a new control symbol.
*[m,nH
This is the control character for the absolute positioning of the cursor. Position it at the m-th row and the n-th column. With it, you can precisely
Correctly control the display of your documentation, and the problem mentioned above will be solved.
There are many applications for the control characters introduced above, such as fancy nicknames and signatures exceeding 6 lines.
You can summarize the specific methods of simplifying complex code by yourself. I may also talk about it if I have the opportunity.
Mastered code *[2J *[A *[B *[C *[D *[m,nH