『楼 主』:
可否一劳永逸,做一个灵活调用的“LOGO+控制”文件?
使用 LLM 解释/回答一下
话题的引出:
启动DOS有时并不仅仅是为了进入不同的DOS环境中,有时DOS只是个前期准备过程,接下来总会要进入很多不同的特定的过程中。
在从DOS的CONFIG.SYS中出来之后,紧接着要进入autoexec.bat中,的选择菜单并不是总是需要的,不需要时可以按默认项启动。甚至有时连autoexec.bat也不是必要的。
这就产生了一个需求:LOGO及控制界面。我想说的是,可否做一个居留内存的COM小程序,如PROLOGO.COM。
设想如下:
1、PROLOGO.COM 调入内存
2、PROLOGO.COM /U 调出内存
3、屏幕画面: PROLOGO.COM picfilename
以picfilename为屏幕画面,掩盖所有dos启动信息,启动画面下方,显示一个跟Win 2000启动进度条相似的进度条。
4、进度条: PROLOGO.COM /n, n从0--9,再从A--F,共16步
实现进度条可控步进,PROLOGO.COM /0----PROLOGO.COM /F按顺序插入批处理进程的不同位置,进度条随PROLOGO.COM /n 出现的位置步进,这样就实现了进度条的可控步进。
5、热键设置:实现热键等待和热键呼出
进入autoexec.bat后,启动菜单(如果有的话)被PROLOGO.COM的热键掩盖,等待x秒(x数值由autoexec.bat中的菜单命令决定,没有菜单时默认3秒),在此x秒之内,屏蔽除热键之外的所有按键,热键无动作,系统以autoexec.bat中的默认启动项启动,热键有动作时,就撤掉LOGO,并调出autoexec.bat中的菜单供选择,同时PROLOGO.COM调出内存,后续的PROLOGO.COM /n等命令失效。
PROLOGO.COM的调用参数和格式:
PROLOGO.COM
无参数的PROLOGO.COM,把PROLOGO.COM调入内存
/U,把PROLOGO.COM调出内存
picfilename:调用的LOGO图片,该参数省略时,调用系统文件中的那个Win98蓝天白云画面
batchname:调用的批处理文件,该参数省略时,调用autoexec.bat
/0,开始显示进度条,结束热键相应,并屏蔽键盘
/1--/F,控制进度条推进的进度(/F完成进度条推进,并实现/U的功能)
文件名参数的识别:
由PROLOGO.COM根据文件扩展名自动识别,图片文件只支持一两种就够了,批处理文件只支持bat和cmd就够了。
这样,PROLOGO.COM就实现了热键呼出等待、图片LOGO加载、进度条可控的步进显示等多项通用的基本功能。带参数调用就可以全自动实现很多重要的维护、修复等复杂功能,实现热键呼出很方便,不需要这些复杂功能时,又可以按照批处理进行常规启动。
缺点有两个:一是要占用一些内存,二是热键等待会使启动速度延迟几秒钟。
这个文件应该在什么位置加载?最好能在config.sys中加载,如果config.sys中没有加载,就失去热键呼出功能,但仍然可以在autoexec.bat中加载,实现其余的功能。
还有什么其他通用功能,请各位指点、补充。
请高手各施绝招,把这个程序写出来,我估计,这样的程序会大受欢迎的。同意这个开发思路的朋友,请动一下手,抬抬帖子。
最后,更希望版主支持和参与这个程序的开发。
我来贵坛时间很短,水平又很菜,连日来学习了论坛上很多帖子,有一种找到了家的感觉。周围懂DOS的人越来越少,一直觉得自己是被微软跟DOS一起抛弃掉了,这次终于找到了DOS的家。
衷心希望大家对我多多点拨、指教。
Last edited by bootp on 2006-12-4 at 04:55 PM ]
**Introduction of the topic:**
Starting DOS is not always just to enter different DOS environments. Sometimes DOS is just a preliminary preparation process, and then there will always be many different specific processes to enter.
After coming out of the CONFIG.SYS of DOS, we immediately enter autoexec.bat. The selection menu is not always needed. When not needed, we can start with the default option. Even sometimes, autoexec.bat is not necessary.
This gives rise to a need: LOGO and control interface. I mean, can we make a COM mini-program that stays in memory, such as PROLOGO.COM.
The设想 is as follows:
1. PROLOGO.COM is loaded into memory
2. PROLOGO.COM /U unloads from memory
3. Screen picture: PROLOGO.COM picfilename
With picfilename as the screen picture, covering up all DOS startup information. Below the startup picture, a progress bar similar to the Windows 2000 startup progress bar is displayed.
4. Progress bar: PROLOGO.COM /n, where n ranges from 0--9, then from A--F, totaling 16 steps
To achieve controllable step-by-step progress of the progress bar. PROLOGO.COM /0----PROLOGO.COM /F are inserted at different positions in the batch processing process in sequence. The progress bar steps forward with the position where PROLOGO.COM /n appears, thus achieving controllable step-by-step progress of the progress bar.
5. Hotkey setting: To achieve hotkey waiting and hotkey calling
After entering autoexec.bat, the startup menu (if any) is covered by the hotkey of PROLOGO.COM, waiting for x seconds (the value of x is determined by the menu command in autoexec.bat, and the default is 3 seconds if there is no menu). Within these x seconds, all keys except the hotkey are blocked. The hotkey has no action, and the system starts with the default startup item in autoexec.bat. When the hotkey has an action, the LOGO is removed, and the menu in autoexec.bat is called for selection. At the same time, PROLOGO.COM is unloaded from memory, and subsequent commands such as PROLOGO.COM /n are invalid.
Calling parameters and format of PROLOGO.COM:
PROLOGO.COM
PROLOGO.COM without parameters loads PROLOGO.COM into memory
/U unloads PROLOGO.COM from memory
picfilename: The LOGO picture to be called. When this parameter is omitted, the Win98 blue sky and white clouds picture in the system file is called
batchname: The batch file to be called. When this parameter is omitted, autoexec.bat is called
/0 starts to display the progress bar, ends hotkey response, and blocks the keyboard
/1--/F controls the progress of the progress bar advance (/F completes the progress bar advance and realizes the function of /U)
Recognition of file names:
Identified automatically by PROLOGO.COM according to the file extension. Only one or two types of picture files are supported, and only bat and cmd types of batch files are supported.
In this way, PROLOGO.COM realizes multiple general basic functions such as hotkey calling waiting, picture LOGO loading, and controllable step-by-step display of the progress bar. Calling with parameters can automatically realize many important maintenance, repair and other complex functions. It is very convenient to call the hotkey. When not needing these complex functions, it can still start normally according to the batch processing.
There are two drawbacks: one is that it will occupy some memory, and the other is that the hotkey waiting will delay the startup speed by a few seconds.
In which position should this file be loaded? It is best to load it in config.sys. If it is not loaded in config.sys, the hotkey calling function is lost, but it can still be loaded in autoexec.bat to realize the remaining functions.
Are there any other general functions? Please give pointers and supplements.
Please experts use their own unique skills to write this program. I estimate that such a program will be very popular. Friends who agree with this development idea, please take a hand and lift the post.
Finally, I hope the forum moderator supports and participates in the development of this program.
I have been on this forum for a very short time, and my level is very poor. I have studied many posts on the forum these days and have a feeling of finding a home. There are fewer and fewer people around who understand DOS. I always feel that I have been abandoned by Microsoft and DOS together. This time I finally found the home of DOS.
I sincerely hope that everyone will give me more guidance and advice.
Last edited by bootp on 2006-12-4 at 04:55 PM ]
|