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
int locationX = 64;
const int locationY = 32;
const int offsetX = 24;
// get the title of the window detected by the Window Location rule
string windowTitleActual = BFS.Window.GetText(windowHandle);
int openParen = windowTitleActual.IndexOf("(");
if (openParen > 0)
{
int closeParen = windowTitleActual.IndexOf(")", openParen + 1, 2);
if (closeParen > 0)
{
const string sessionIDValues = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
String sessionID = windowTitleActual.Substring(openParen + 1, 1);
int sessionX = sessionIDValues.IndexOf(sessionID);
locationX = locationX + offsetX * sessionX;
BFS.Window.SetLocation(windowHandle, locationX, locationY);
}
}
}
}