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

Move Only a Specific Window of an Application

Description
This script is intended to be called from a Window Location rule. When Window Location detects a new window for an application that matches the rule, it will call this script to check the window title and move the window to the location specified in the script if the window title matches.
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)
	{
		// modify the windowTitleToMatch string below to specify the title of the window you want moved by the Window Location rule
        // modify the locationX and locationY int values below to set the location the window should be moved to if its window title matches
		string windowTitleToMatch = "BlobWindow";
        int locationX = 0;
        int locationY = 400;
		
		// get the title of the window detected by the Window Location rule
		string windowTitleActual = BFS.Window.GetText(windowHandle);

		// move the window if its title matches
		if (windowTitleActual.Contains(windowTitleToMatch))
			{
				BFS.Window.SetLocation(windowHandle, 0, 400);
			}
	}
}