using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Specify the monitor ID for this script to run on
// and the sleep time between switching windows (in milliseconds)
uint monitorID = 2;
uint sleepTimeMS = 5000;
// Get all of the visible windows on the monitor
IntPtr[] visibleWindows = BFS.Window.GetVisibleWindowHandlesByMonitor(monitorID);
// Loop through the windows forever
while (true)
{
foreach (IntPtr window in visibleWindows)
{
// Get the currently focused window
IntPtr currentWindow = BFS.Window.GetFocusedWindow();
// Focus the window on the monitor specified above to bring it to the front
if (!String.IsNullOrEmpty(BFS.Window.GetText(window)))
{
BFS.Window.Focus(window);
}
// Return focus to the previously focused window
BFS.Window.Focus(currentWindow);
// Wait the desired time before continuing to the next window
BFS.General.ThreadWait(sleepTimeMS);
}
}
}
}