本帖最后由 afan 于 2010-1-1 23:50 编辑
回复 1# maxkingmax
运行下此段代码即可~Local $fP = RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\SciTe\全局设置.properties'
Local $fR = FileRead($fP), $sN, $fO, $msg
$sN0 = StringRegExp($fR, '\[Shortcuts\]([^\$]+)\$', 3)
If @error Then Exit (MsgBox(48, '?', '未找到配置文件,请确认已正确安装Au3 '))
$sN = StringRegExpReplace($sN0[0], '(\r\n){2,}', @CRLF)
If @extended > 0 Then
$sN = StringRegExpReplace($sN, '\\', '\\\\')
$sN = StringRegExpReplace($fR, '(\[Shortcuts\])[^\$]+(\$)', '\1' & $sN & '\2')
FileMove($fP, $fP & '.bak')
$fO = FileOpen($fP, 2)
FileWrite($fO, $sN)
FileClose($fO)
MsgBox(64, 'ok!', '发现问题并已(备份后)修正!')
Else
MsgBox(0, 'ok?', '未发现问题')
EndIf
|