Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

Open Chrome in Kiosk Mode on 2 Monitors

Description
This script will open Chrome to the specified websites in kiosk mode on 2 monitors. You can change the websites in the "websiteMonitor1" and "websiteMonitor2" variables at the top. If you'd like to modify this function to work with more than 2 monitors, make sure to add "websiteMonitor#" variables at the top, copy/paste the second block of code (for monitor 2), and modify it for your monitor #.
Language
C#.net
Minimum Version
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
May 8, 2015
Date Last Modified
May 8, 2015

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
		//update these two strings with the desired websites (add websiteMonitor3, etc if you have more than 2 monitors, and copy/update the monitor 2 code block for each additional monitor)
		string websiteMonitor1 = "https://www.displayfusion.com";
		string websiteMonitor2 = "https://www.checkcentral.cc";
		
		//Open websiteMonitor1 on monitor 1 in kiosk mode (edit the monitor ID in the BFS.Window.MoveToMonitor function if needed)
		BFS.Application.Start("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "-kiosk -new-window " + websiteMonitor1);
		BFS.General.ThreadWait(2000);
		windowHandle = BFS.Window.GetFocusedWindow();
		BFS.Window.MoveToMonitor(1, windowHandle);
		BFS.General.ThreadWait(1000);
		
		//Open websiteMonitor2 on monitor 2 in kiosk mode (edit the monitor ID in the BFS.Window.MoveToMonitor function if needed)
		BFS.Application.Start("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "-kiosk -new-window " + websiteMonitor2);
		BFS.General.ThreadWait(2000);
		windowHandle = BFS.Window.GetFocusedWindow();
		BFS.Window.MoveToMonitor(2, windowHandle);
	}
}