Local $AP = RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir')
Local $reg = 'HKLM\SOFTWARE\Classes\AutoIt3Script\Shell', $fg = '新版'
If RegRead($reg & '\CGUICompile', '') = '' Then $fg = '旧版'
Local $msg = MsgBox(3 + 48, '当前使用的风格为:' & $fg & ',请选择更改', '是否使用旧版风格?点击“是”使用旧版风格;点击“否”使用新版风格 ' & @CRLF & @CRLF & '点击“取消”放弃更改。 ')
If $msg = 6 Then
RegDelete($reg & '\CGUICompile')
RegWrite($reg, '', 'REG_SZ', 'run')
RegWrite($reg & '\GUICompile', '', 'REG_SZ', '编译脚本(带选项)')
RegWrite($reg & '\GUICompile\Command', '', 'REG_SZ', '"' & $AP & '\SciTE\ACNWrapper\ACNWrapper_GUI.exe" /in "%l"')
RegWrite($reg & '\Open', '', 'REG_SZ', '编辑脚本(SCITE)')
RegWrite($reg & '\Open\Command', '', 'REG_SZ', '"' & $AP & '\SciTE\SciTE.exe" "%1"')
RegWrite($reg & '\Edit', '', 'REG_SZ', '编辑脚本(记事本)')
RegWrite($reg & '\Edit\Command', '', 'REG_SZ', '"' & @SystemDir & '\notepad.exe" "%1"')
RegWrite($reg & '\Run', '', 'REG_SZ', '运行脚本')
RegWrite($reg & '\Run\Command', '', 'REG_SZ', $AP & '\AutoIt3.exe "%1" %*')
MsgBox(64, '完成', '已使用旧版风格~!')
ElseIf $msg = 7 Then
RegDelete($reg & '\GUICompile')
RegDelete($reg & '\Open')
RegDelete($reg & '\Run')
RegWrite($reg & '', '', 'REG_SZ', 'open')
RegWrite($reg & '\CGUICompile', '', 'REG_SZ', '编译脚本(带选项)')
RegWrite($reg & '\CGUICompile\Command', '', 'REG_SZ', '"' & $AP & '\SciTE\ACNWrapper\ACNWrapper_GUI.exe" /in "%l"')
RegWrite($reg & '\Edit', '', 'REG_SZ', '编辑脚本(SCITE)')
RegWrite($reg & '\Edit\Command', '', 'REG_SZ', '"' & $AP & '\SciTE\SciTE.exe" "%1"')
RegWrite($reg & '\open', '', 'REG_SZ', '运行脚本')
RegWrite($reg & '\open\Command', '', 'REG_SZ', $AP & '\AutoIt3.exe "%1" %*')
MsgBox(64, '完成', '已使用新版风格~!')
EndIf