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?

Open Multiple Websites on Specific Monitors

Description
This script will open the specified websites on their specified monitors. Set the websites and monitor IDs in the websites array on line 9.
Language
C#.net
Minimum Version
Created By
-
Contributors
Keith Lammers (BFS)
Date Created
Mar 11, 2019
Date Last Modified
Mar 11, 2019

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
		// Set the websites and their target monitor IDs here
		string[,] websites = {
            { "https://www.displayfusion.com", "2" },
            { "https://www.clipboardfusion.com", "3" }
		};
		
		// Open the websites and move them to their target monitors
		for (int i = 0; i < websites.GetLength(0); i++)
		{
            IntPtr window = BFS.Web.OpenUrlNewWindow(websites[i,0]);
            uint monitorID = Convert.ToUInt32(websites[i,1]);            
            BFS.Window.MoveToMonitorMaximized(monitorID, window);
		}
	}
}