using System;
using System.Drawing;
public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
        // Set the application paths here
		string app1Path = @"C:\Windows\notepad.exe";
		string app2Path = @"C:\Program Files\Notepad++\Notepad++.exe";
		
		// Launches the applications
		uint app1ID = BFS.Application.Start(app1Path);
		uint app2ID = BFS.Application.Start(app2Path);
		
		// Gets their main windows
		IntPtr app1Window = BFS.Application.GetMainWindowByAppID(app1ID);
		IntPtr app2Window = BFS.Application.GetMainWindowByAppID(app2ID);
		
		// Changes focus every 15 seconds
		// To cancel, right-click the tray icon for the script and choose "Stop Script"
		while (true)
		{
            BFS.Window.Focus(app1Window);
            BFS.General.ThreadWait(15000);
            BFS.Window.Focus(app2Window);
            BFS.General.ThreadWait(15000);
		}
	}
}