为什么我用IF语句判断时加三个条件实现不来呢。、
代码:
Case $Button11
If GUICtrlRead($Checkbox1) = $GUI_CHECKED And GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ;设置首页加去除特效
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", "REG_DWORD", "3")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "DragFullWindows", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "FontSmoothing", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "UserPreferencesMask", "REG_BINARY", "BE3E0700")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "MinAnimate", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "WebView", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarAnimations", "REG_DWORD", "00000000")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewWatermark", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewAlphaSelect", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewShadow", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page","reg_sz","")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Window Title", "reg_sz", "")
ControlDisable("", "", $button11)
MsgBox(0,"提示","设置成功!")
ControlEnable("", "", $button11)
ElseIf GUICtrlRead($Checkbox2) = $GUI_CHECKED And GUICtrlRead($Checkbox3) = $GUI_CHECKED Then ;设置首页加免疫
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page","reg_sz","")
ToolTip("正在免疫autorun.inf,请稍候....", @DesktopWidth - 200, @DesktopHeight - 80, "", 0, 1)
_MDdir()
ControlDisable("", "", $button11)
MsgBox(0,"提示","设置成功!")
ToolTip("")
ControlEnable("", "", $button11)
ElseIf GUICtrlRead($Checkbox1) = $GUI_CHECKED And GUICtrlRead($Checkbox2) = $GUI_CHECKED And GUICtrlRead($Checkbox3) = $GUI_CHECKED Then ;设置首页加加速加免疫
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", "REG_DWORD", "3")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "DragFullWindows", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "FontSmoothing", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "UserPreferencesMask", "REG_BINARY", "BE3E0700")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "MinAnimate", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "WebView", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarAnimations", "REG_DWORD", "00000000")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewWatermark", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewAlphaSelect", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewShadow", "REG_DWORD", "1")
ToolTip("正在免疫autorun.inf,请稍候....", @DesktopWidth - 200, @DesktopHeight - 80, "", 0, 1)
_MDdir()
ControlDisable("", "", $button11)
MsgBox(0, "提示", "设置成功")
ToolTip("")
ControlEnable("", "", $button11)
ElseIf GUICtrlRead($Checkbox1) = $GUI_CHECKED And GUICtrlRead($Checkbox3) = $GUI_CHECKED Then ;去特效加免疫
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", "REG_DWORD", "3")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "DragFullWindows", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "FontSmoothing", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "UserPreferencesMask", "REG_BINARY", "BE3E0700")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "MinAnimate", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "WebView", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarAnimations", "REG_DWORD", "00000000")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewWatermark", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewAlphaSelect", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewShadow", "REG_DWORD", "1")
ToolTip("正在免疫autorun.inf,请稍候....", @DesktopWidth - 200, @DesktopHeight - 80, "", 0, 1)
_MDdir()
ControlDisable("", "", $button11)
MsgBox(0,"提示","设置成功!")
ToolTip("")
ControlEnable("", "", $button11)
ElseIf GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ;去特效
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", "REG_DWORD", "3")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "DragFullWindows", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "FontSmoothing", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "UserPreferencesMask", "REG_BINARY", "BE3E0700")
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics", "MinAnimate", "REG_SZ", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "WebView", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarAnimations", "REG_DWORD", "00000000")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewWatermark", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewAlphaSelect", "REG_DWORD", "0")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ListviewShadow", "REG_DWORD", "1")
ControlDisable("", "", $button11)
MsgBox(0,"提示","设置成功!")
ControlEnable("", "", $button11)
ElseIf GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ;设置首页
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page","reg_sz","")
ControlDisable("", "", $button11)
MsgBox(0,"提示","设置成功!")
ControlEnable("", "", $button11)
ElseIf GUICtrlRead($Checkbox3) = $GUI_CHECKED Then ;免疫
ToolTip("正在免疫autorun.inf,请稍候....", @DesktopWidth - 200, @DesktopHeight - 80, "", 0, 1)
_MDdir()
ControlDisable("", "", $button11)
MsgBox(0,"提示","设置成功!")
ToolTip("")
ControlEnable("", "", $button11)
Else
ControlDisable("", "", $button11)
MsgBox(0,"提示","您没做优化啊!赶快进行优化设置吧!")
ControlEnable("", "", $button11)
EndIf
帮忙看看,我用最新的版本还是实现了不里面的判断三个条件成立!!
急啊!!
这个判断该怎么改呢?
判断两个条件可以实现!!
在说明白点:我的意思是我有三个选择框要判断都选中是运行指定命令,可是却不能实现,判断两个却可以,不知道判断三个是不是我上面写的代码,请高手看看!!
急!!!
[ 本帖最后由 xgdjkk 于 2008-7-13 17:59 编辑 ] |