我们有多台电视,每台都连接到不同的计算机。目标是显示/设置焦点在通过两个应用程序的连续循环循环上。这必须在所有电视上同步。最初我通过发送 alt+esc 键来设置它在任务栏中的所有应用程序之间循环。效果很好,但很难在所有电视上同步它。所以我使用 AppActivate 来设置焦点并根据偶数/奇数分钟在窗口之间切换。它现在已同步,但屏幕似乎每秒都在尝试将焦点设置到窗口,从而导致屏幕一直闪烁。我怎样才能避免它???有什么建议么???这是代码的一部分。
' Loop lasts 1 second
intSleep = 1000
Set wshShell = CreateObject("WScript.Shell")
'repeat process indefinetly
Do while infiniteloop=0
a = minute(time())
intResult = a Mod 2 ' to check for even/odd minute
If intResult = 0 Then
'display window1
if wshShell.AppActivate "Display - [Dashboard]" = false then
wshShell.AppActivate "Display - [Dashboard]"
end if
ElseIf intResult = 1 Then
'display window2
if wshShell.AppActivate "Display - [TEST]" = false then
wshShell.AppActivate "Display - [TEST]"
end if
End If
Wscript.Sleep intSleep
Loop