【发布时间】:2023-04-03 07:04:01
【问题描述】:
我已经编写了以下 VBScript,它将 Windows 主题更改为默认的 Windows 主题,但是即使 Windows 主题已经是默认的 Windows 主题,它也会触发。
如何添加一些逻辑来检查当前的 Windows 主题是否不是默认的 Windows 主题,如果是则什么都不做?
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Windows\Resources\Themes\aero.theme"
For i = 1 To 10
WScript.Sleep 1000
If WshShell.AppActivate("Personalization") Then
WshShell.Sendkeys "%FC"
WshShell.Sendkeys "{F4}"
Exit For
End If
Next
【问题讨论】: