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?
Save up to 50% on our desktop apps during our big Year End Sale!Save up to 50% on our desktop apps during our big Year End Sale, including DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!Save up to 50% on our desktop apps during our big Year End Sale!

Close All Chrome Windows

Description
This script will close all open Chrome windows.
Language
C#.net
Minimum Version
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
Mar 14, 2016
Date Last Modified
Mar 14, 2016

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run()
	{
		IntPtr[] windows = BFS.Window.GetAllWindowHandles();
		foreach (IntPtr window in windows)
		{
			if (BFS.Application.GetMainFileByWindow(window).EndsWith("chrome.exe"))
				BFS.Window.Close(window);
		}
	}
}