131738
发表于 2012-3-15 23:27:21
回复 23# afan
我的替换脚本用于au3文档一直没有问题,
只是这次用于 APIEx 出现这个问题,应该不是普遍现象,看来只能手动修改这个偶然错误了
afan
发表于 2012-3-15 23:31:58
回复 31# 131738
你的同一文件在数组中的元素是连续的吗?
131738
发表于 2012-3-15 23:34:29
回复131738
你的数组是如何定义的?
如果 $aWinAPIEx[$x] 只需要查找 $aWinAPIEx[$x] 替 ...
afan 发表于 2012-3-15 23:24 http://www.autoitx.com/images/common/back.gif
5 的文件的, 空行分隔:Global $aWinAPIEx
$aWinAPIEx = 'Closes and discards any paths in the specified device context.'
$aWinAPIEx = '关闭和删除指定设备环境的任何路径.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AbortPath.txt'
$aWinAPIEx = ' Handle to the device context from which a path will be discarded.'
$aWinAPIEx = ' 目标设备环境句柄.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AbortPath.txt'
$aWinAPIEx = 'Success: 1.'
$aWinAPIEx = '成功: 返回 1.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AbortPath.txt'
$aWinAPIEx = 'Failure: 0 and sets the @error flag to non-zero.'
$aWinAPIEx = '失败: 返回 0, @error 设置为非 0 值.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AbortPath.txt'
$aWinAPIEx = 'Displays a Windows About dialog box.'
$aWinAPIEx = '显示 Windows 系统"关于"对话框.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = ' The title of the Windows About dialog box.'
$aWinAPIEx = ' "关于"对话框的窗口标题.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = ' The first line after the text "Microsoft".'
$aWinAPIEx = ' 显示在对话框第一行 "Microsoft" 后面的文本.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = ' The text to be displayed in the dialog box after the version and copyright information.'
$aWinAPIEx = ' 显示在对话框版权和授权信息之间的文本.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = ' Handle to the icon that the function displays in the dialog box.'
$aWinAPIEx = ' [可选参数] 对话框显示图标的句柄.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = ' Handle to a parent window.'
$aWinAPIEx = ' [可选参数] 父窗口句柄.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = 'Success: 1.'
$aWinAPIEx = '成功: 返回 1.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = 'Failure: 0 and sets the @error flag to non-zero.'
$aWinAPIEx = '失败: 返回 0, @error 设置为非 0 值.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AboutDlg.txt'
$aWinAPIEx = 'Sets the input locale identifier for the calling thread or the current process.'
$aWinAPIEx = '设置调用线程或当前进程的输入法区域设置标识符.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' The input locale identifier to be activated. This parameter must be either the handle to a keyboard'
$aWinAPIEx = ' 被激活的输入法区域标识符'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' layout or one of the following values.'
$aWinAPIEx = ' 布局或下列值之一:'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' $HKL_NEXT'
$aWinAPIEx = ' $HKL_NEXT --- 系统区域标识符列表中的下一个区域标识符.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' $HKL_PREV'
$aWinAPIEx = ' $HKL_PREV --- 系统区域标识符列表中的前一个区域标识符.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' The flag that specifies how the input locale identifier is to be activated. This parameter can be'
$aWinAPIEx = ' [可选参数] 指定如何激活输入法区域标识符.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' one of the following values.'
$aWinAPIEx = ' 可以是以下值之一:'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' $KLF_REORDER'
$aWinAPIEx = ' $KLF_REORDER --- 系统区域标识符列表重新排序, 并将激活的区域标识符置于顶部.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' $KLF_RESET'
$aWinAPIEx = ' $KLF_RESET --- 如设置此项而未设置 KLF_SHIFTLOCK, 则 Caps Lock 状态为打开; 如同时设置 KLF_SHIFTLOCK, 则 Caps Lock 状态为按 Shift 键关闭.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' $KLF_SETFORPROCESS'
$aWinAPIEx = ' $KLF_SETFORPROCESS --- 为全部进程指定区域标识符, 并发送 WM_INPUTLANGCHANGE 消息到当前线程或活动窗口.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = ' $KLF_SHIFTLOCK'
$aWinAPIEx = ' $KLF_SHIFTLOCK -- 用于 KLF_RESET. 见 KLF_RESET 的解释.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = 'Success: The previous input locale identifier.'
$aWinAPIEx = '成功: 返回先前的输入法区域标识符.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = 'Failure: 0 and sets the @error flag to non-zero.'
$aWinAPIEx = '失败: 返回 0, @error 设置为非 0 值.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_ActivateKeyboardLayout.txt'
$aWinAPIEx = 'Places the given window in the system-maintained clipboard format listener list.'
$aWinAPIEx = '将特定窗口放到系统维护剪贴板格式侦听器列表.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddClipboardFormatListener.txt'
$aWinAPIEx = ' Handle to the window to be placed.'
$aWinAPIEx = ' 特定窗口的句柄.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddClipboardFormatListener.txt'
$aWinAPIEx = 'Success: 1.'
$aWinAPIEx = '成功: 返回 1.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddClipboardFormatListener.txt'
$aWinAPIEx = 'Failure: 0 and sets the @error flag to non-zero.'
$aWinAPIEx = '失败: 返回 0, @error 设置为非 0 值.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddClipboardFormatListener.txt'
$aWinAPIEx = 'This function requires Windows Vista or later.'
$aWinAPIEx = '此函数需要 Windows Vista 或更高版本系统.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddClipboardFormatListener.txt'
$aWinAPIEx = 'Adds the font resource from a memory image to the system.'
$aWinAPIEx = '添加系统内存映像的字体资源.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = ' The pointer to a font resource.'
$aWinAPIEx = ' 字体资源指针.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = ' The number of bytes in the font resource.'
$aWinAPIEx = ' 字体资源的字节数.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = 'Success: The handle uniquely identifies the fonts that were installed on the system, @extended flag will contain'
$aWinAPIEx = '成功: 返回安装到系统的字体句柄.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = ' a number of fonts added to the system as a result of this call. '
$aWinAPIEx = ' @extended 包含函数调用的结果.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = 'Failure: 0 and sets the @error flag to non-zero.'
$aWinAPIEx = '失败: 返回 0, @error 设置为非 0 值.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = 'This function allows an application to get a font that is embedded in a document or a Web page. A font that is'
$aWinAPIEx = '本函数允许应用程序获取文档或网页嵌入的字体.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = 'added by this is always private to the process that made the call and is not enumerable.'
$aWinAPIEx = '添加的字体始终为进程私有调用, 且不枚举.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = 'When the function succeeds, the caller of this function can free the memory pointed to by $pData because the system'
$aWinAPIEx = '当函数成功后,系统产生自己的内存副本, 函数调用者可以释放 $pData 指针指向的内存.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = 'has made its own copy of the memory. To remove the fonts that were installed, call _WinAPI_RemoveFontMemResourceEx().'
$aWinAPIEx = '要删除已安装的字体, 请调用 _WinAPI_RemoveFontMemResourceEx().'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
$aWinAPIEx = 'However, when the process goes away, the system will unload the fonts.'
$aWinAPIEx = '当进程消失时, 系统会卸载字体.'
$aWinAPIEx = @ScriptDir & '\txt2htm\txtlibfunctions\_WinAPI_AddFontMemResourceEx.txt'
afan
发表于 2012-3-15 23:38:28
回复 33# 131738
看懂了,是连续的,那就好办了
Ycxw2008
发表于 2012-3-15 23:38:59
大叔是为了质量所以每行一个元素吗{:face (245):}
131738
发表于 2012-3-15 23:43:59
回复131738
你的同一文件在数组中的元素是连续的吗?
afan 发表于 2012-3-15 23:31 http://www.autoitx.com/images/common/back.gif
这个不能保证,如果新版本删除整行文本,相对索引空出,
APIEx 如果删除某个函数,则相应空出几个或10多个索引号,如同是添加有新的文本或函数,
我会利用这些空索引号,这样可能同一个函数的描述文本行会分布在不同的索引段!
afan
发表于 2012-3-15 23:45:27
回复 36# 131738
那就不好办了
131738
发表于 2012-3-15 23:45:30
回复131738
看懂了,是连续的,那就好办了
afan 发表于 2012-3-15 23:38 http://www.autoitx.com/images/common/back.gif
有不连续的,看 36 楼
131738
发表于 2012-3-15 23:49:28
回复131738
那就不好办了
afan 发表于 2012-3-15 23:45 http://www.autoitx.com/images/common/back.gif
劳烦了,只是偶然错误,算了,谢谢!!!
131738
发表于 2012-3-15 23:51:10
大叔是为了质量所以每行一个元素吗
Ycxw2008 发表于 2012-3-15 23:38 http://www.autoitx.com/images/common/back.gif
不是质量问题,汉化脚本这样编写的。
afan
发表于 2012-3-15 23:52:36
回复 38# 131738
你这样是十分不便于维护的,建议使用配置文件,字段名就是文件路径,关键字是查找项,值是替换项,那样简单极了,维护也简单,增删也完全不会乱套
Handle to the device context from which a path will be discarded. =目标设备环境句柄.
Success: 1. = 成功: 返回 1.
Failure: 0 and sets the @error flag to non-zero. = 失败: 返回 0, @error 设置为非 0 值.
131738
发表于 2012-3-15 23:59:19
回复131738
你这样是十分不便于维护的,建议使用配置文件,字段名就是文件路径,关键字是查找项 ...
afan 发表于 2012-3-15 23:52 http://www.autoitx.com/images/common/back.gif
利用配置文件?我想想看。。。
lxwlxwayy
发表于 2012-3-16 00:03:40
各位辛苦了,顶下
afan
发表于 2012-3-16 00:03:52
回复 42# 131738
用你现有的数组生成个 ini 配置文件也十分简单
131738
发表于 2012-3-16 00:03:55
回复 41# afan
配置文件不容易记录失败行,如果记录失败行,好像要用到文件指针吧!这个不懂!
不会捕捉配置文件的行号!