-■■■什么是Xtools快捷方式文件?
微软发明了windows快捷方式,使用起来感觉确实方便。受其影响,我也创建了一种快捷方式,称之为Xtools快捷方式。
Xtools快捷方式是一个UTF8的文本文件,扩展名为".XtoolsText",它的格式是XML,它的内容大致如下:
<?xml version="1.0"?>
<Xtools_Text xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Xtools_Command>delete</Xtools_Command>
<xtools_Command_N_Para>
<Xtools_Command_1_Para>
<command_para_type>dir</command_para_type>
<command_para_content>bin</command_para_content>
</Xtools_Command_1_Para>
<Xtools_Command_1_Para>
<command_para_type>dir</command_para_type>
<command_para_content>obj</command_para_content>
</Xtools_Command_1_Para>
<Xtools_Command_1_Para>
<command_para_type>file</command_para_type>
<command_para_content>.sdf</command_para_content>
</Xtools_Command_1_Para>
<Xtools_Command_1_Para>
<command_para_type>file</command_para_type>
<command_para_content>.pch</command_para_content>
</Xtools_Command_1_Para>
</xtools_Command_N_Para>
</Xtools_Text>
-■■■为什么需要Xtools快捷方式文件?
在许多场合,需要快速执行某个工具,同时需要给这个工具传递一些数据,如果需要传递的数据复杂,使用命令行参数就十分不方便。
双击.XtoolsText文件,windows资源管理器会启动与之关联的程序,并把文件名传给它。我把需要传递的参数写好在.XtoolsText文件里,与之关联的程序从中读取;如此就可以方便地构造很复杂的参数了。
-■■■Xtools快捷方式的内容正在完善
目前,Xtools快捷方式提供了快速删除Bin和Obj等目录的一个工具,接受Xtools快捷方式的工具程序今后会不断增多。欢迎关注。
-■■■安装Xtools快捷方式
首先请阅读"D:\Xtools\pg\XXX-Xtools_File\注册表研究memo.DOC",理解其中的道理。之后双击"D:\Xtools\pg\XXX-Xtools_File\修改注册表.reg",完成安装。
安装完成后,如果双击.XtoolsText文件,Xtools_Text_Processor.exe就会启动。它读取被双击的.XtoolsText文件,采取相应的动作。
在目前,它仅仅是接着把参数传给另一个程序delete_dir_or_file.exe。delete_dir_or_file.exe是一个真正的工具程序。所以说,Xtools_Text_Processor.exe只是一个中间人而已。
那么,Xtools_Text_Processor.exe多余吗?不!今后随着其他工具程序的增加,Xtools_Text_Processor.exe会根据.XtoolsText文件的内容去启动不同的工具程序。如此设计,目的是为了尽量少修改注册表而得到更广泛的应用---为每个工具去创建它自己的文件类型,太麻烦了。
-■■■参考
D:\Xtools\pg\XXX-Xtools_File\下面的
注册表研究memo.DOC
修改注册表.reg
01说明.txt