AU3程序更新了,帮助文件也更新到2017.12.09了,但是有些代码新版本无法编译,旧版本没问题,但是又想用新的帮助文件,自己写了一个更新文件,高手勿喷,新人借鉴下,高手指点一下哪里不足。FileInstall("AutoIt.chm", @TempDir & "\AutoIt.chm", 1)
If ProcessExists("AutoIt3Help.exe") Then
ProcessClose("AutoIt3Help.exe")
MsgBox(64,"信息","正在执行,请稍后",2)
EndIf
$au3_install = RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt", "InstallDir")
$au3_ver=RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt", "Version")
If @error Then
MsgBox(0, "提示", "未检测到Autoit,文件将释放到当前目录")
FileCopy(@TempDir & "\AutoIt.chm", @ScriptDir, 1)
FileDelete(@TempDir & "\AutoIt.chm")
ShellExecute("AutoIt.chm")
Else
FileDelete($au3_install & "\autoit.chw")
FileCopy(@TempDir & "\AutoIt.chm", $au3_install, 1)
FileDelete(@TempDir & "\AutoIt.chm")
MsgBox(64,"AutoIt"&$au3_ver,"帮助文件更新完毕,2秒将自动启动帮助文件",2)
Run($au3_install&"\AutoIt3Help.exe")
EndIf
|