using System;
using System.Drawing;
// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - Trigger target when run by a Trigger rule
// - TitleBar Button owner when run by a TitleBar Button
// - Jump List owner when run from a Taskbar Jump List
// - Currently focused window if none of these match
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Set the website URLs here
string website1 = "https://www.displayfusion.com";
string website2 = "https://www.clipboardfusion.com";
// Open the two websites
IntPtr window1 = BFS.Web.OpenUrlNewWindow(website1);
IntPtr window2 = BFS.Web.OpenUrlNewWindow(website2);
// Maximize them on monitor 1
BFS.Window.MoveToMonitorMaximized(1, window1);
BFS.Window.MoveToMonitorMaximized(1, window2);
// Switch between them every 5 seconds
while(true)
{
BFS.Window.Focus(window1);
BFS.General.ThreadWait(5000);
BFS.Window.Focus(window2);
BFS.General.ThreadWait(5000);
}
}
}