================================================================================
Readme - ChineseSimplified Readme (简体中文说明)
========================================
支持正则表达式的批量替换处理。

可以使用替换表来处理文件。

扩展正则表达式功能:
1. 查找中文字符 \c 和非中文字符的全角字符 \~c
2. 替换中也可使用 \n，效果与 $n 相同。n 为一位 1-9 的数字。

调用方法例:
-"转换为简体中文" Call("Scripts::Main", 1, "SearchReplace_Multi.js", `"繁体转简体.txt"`)
-"批量替换..." Call("Scripts::Main", 1, "SearchReplace_Multi.js")

如果参数是一个不存在的文件，就打开一个“打开文件”对话框来选择文件。

如果无参数文件，或找不到参数所指的文件时，就弹出一个有所有替换表的菜单。
如果有参数文件，该文件必须位于与此脚本文件相同的目录的同名子目录(如 SearchReplace_Multi)中。

替换表文件的格式例：
[Description]
描述内容
[Options]
RegExp=0
Sensitive=1
Multiline=0
EscSequences=0
ReplaceFunction=0
Direction=8
[SearchReplace]
Notepad.exe	AkelPad.exe	替换 “notepad.exe” (不区分大小写) 为“AkelPad.exe”。

四个标题 [Description]、[Options]、[SearchReplace] 、[SearchReplaceAll] 含义及用法：
[Description]	描述说明，其下面的内容只起到描述说明作用，并不执行。
[Options]	参数选项，其下面的内容可被脚本方法 eval 所执行。
		正则表达式：  	RegExp         	0 或 1, 默认值为 1
		区分大小写：  	Sensitive      	0 或 1, 默认值为 0
		多行：        	Multiline      	0 或 1, 默认值为 0
		转义符序列：  	EscSequences   	0 或 1, 默认值为 0
		使用函数替换：	ReplaceFunction	0 或 1, 默认值为 0。如果设为 1，bEscSequences 被设为 0
		方向：		Direction 	1  /* DN_DOWN      =0x00000001 */ 向下
				               	2  /* DN_UP        =0x00000002 */ 向上
				               	4  /* DN_BEGINNING =0x00000004 */ 起始 (默认值)
				               	8  /* DN_SELECTION =0x00000008 */ 在选定范围 (无选定内容时自动全选)
				               	16 /* DN_ALLFILES  =0x00000010 */ 所有文件

[SearchReplace]	搜索替换，其下面的内容以制表符分隔，每行第一个制表符的左边为查找的内容，右边为替换的内容。
		多余的制表符的右边可以用来注释，并不执行。
		\\ - 反斜线
		\r - 回车符
		\n - 换行符
		\t - 制表符
		查找：        pFindIt          		不能为空
		替换：        pReplaceWith     		如果 bSensitive 等于 1 时，不能等于查找内容

[SearchReplaceAll] 与 [SearchReplace] 类似，但其下面的内容只被视为查找和替换的内容使用，再出现其它标题时也不再起到标题的作用。
================================================================================
Readme - English
========================================
Multi SearchReplace using regular expressions.

 Come by official "SearchReplace.js" and "InsertFile.js", and others js. Thanks!

 Use pattern file to handle file(s).

Call Example:
-"Chinese Simplify" Call("Scripts::Main", 1, "SearchReplace_Multi.js", `"ChineseSimplify.txt"`)
-"SearchReplace_Multi" Call("Scripts::Main", 1, "SearchReplace_Multi.js")

If the argument is not a exist file, then open a FileDialog to choose a file.

If there is no argument then popup a menu about all available pattern files.
The file of Argument has to be placed in the subfolder of SearchReplace_Multi,
Same as script name without extension, which also in [AkelPad]\AkelFiles\Plugs\Scripts .

Below is example of pattern format of file :
[Description]
The content of description about this pattern file.
[Options]
RegExp=0
Sensitive=1
Multiline=0
EscSequences=0
ReplaceFunction=0
Direction=8
[SearchReplace]
Notepad.exe	AkelPad.exe	Replace "notepad.exe" (ignore case) with "AkelPad.exe".

The usage of four sections [Description], [Options], [SearchReplace] and [SearchReplaceAll]:
[Description]	The content of its below is only descript what about the pattern file, won't be eval and handled.
[Options]	Argument of option, the content of its below will be executed by method of eval.
		Regular Expression:  	RegExp         	0 or 1, Default is 1
		Case sensitive:  	Sensitive      	0 or 1, Default is 0
		Multiline:        	Multiline      	0 or 1, Default is 0
		Escape Sequences:  	EscSequences   	0 or 1, Default is 0
		Replace function:	ReplaceFunction	0 or 1, Default is 0. If be set to 1, bEscSequences will be set to 0.
		Direction:		Direction 	1  /* DN_DOWN      =0x00000001 */ Search Forward.
					               	2  /* DN_UP        =0x00000002 */ Search Backward.
					               	4  /* DN_BEGINNING =0x00000004 */ Search from Beginning to Ending. (Default)
					               	8  /* DN_SELECTION =0x00000008 */ Search in selection (When no selection, select all).
					               	16 /* DN_ALLFILES  =0x00000010 */ Search in all files.

[SearchReplace]	The content of its below must be separated by a TAB. The both side of every line's first TAB, left is the content of what to Search, right is Replace with.
		More of ONE Tab’s right side always is treated as comment only.
		\\ - Back slace char
		\r - Return char
		\n - new feed char
		\t - TAB char
		What:        pFindIt          		Could not be Empty
		With:        pReplaceWith     		Could not same as pFindIt if bSensitive is true.

[SearchReplaceAll] is similar to [SearchReplace], but its below are treated as the content of search and replace only, any section header won't be action.
================================================================================
