using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run() { // Close all Chrome windows IntPtr[] windows = BFS.Window.GetAllWindowHandles(); foreach (IntPtr window in windows) { if (BFS.Application.GetMainFileByWindow(window).EndsWith("chrome.exe")) BFS.Window.Close(window); } // Open a new browser window with one tab to start BFS.Web.OpenUrl("http://www.google.ca"); // Update the websites listed here with your site URLs string[] websites = { "https://www.displayfusion.com", "https://www.fileseek.ca", "https://www.voicebot.net" }; // Specify the time in milliseconds to wait before switching to the next website uint waitTime = 5000; // Cycle through the websites until the Escape key is pressed while(!BFS.Input.IsKeyDown("27")) { for (int i = 0; i < websites.Length; i++) { // Open the website BFS.Web.OpenUrl(websites[i]); // Wait for the time specified in waitTime, or for the Escape key to be pressed for(int count = 0; count < waitTime; count += 100) { if(BFS.Input.IsKeyDown("27")) { BFS.Input.SendKeys("^({VK_87})"); return; } BFS.General.ThreadWait(100); } // Close the tab BFS.Input.SendKeys("^({VK_87})"); } } } }