using System;
using System.Drawing;
// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - Trigger target when run by a Trigger rule
// - TitleBar Button owner when run by a TitleBar Button
// - Jump List owner when run from a Taskbar Jump List
// - Currently focused window if none of these match
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
//Enter the path to the video file here
//string Path = "C:\\Users\\(YourUser)\\Documents\\JWMedia\\Videos";
string Path = "C:\\Users\\vanav\\OneDrive\\Documents\\JWMedia";
//Start the video
BFS.Application.Start(Path, "");
BFS.General.ThreadWait(1000);
//Grab the window and move it to monitor 2
//IntPtr mirrorWindow = BFS.DisplayFusion.MirrorWindow(windowHandle);
//BFS.Window.MoveToMonitorMaximized(2, mirrorWindow);
//Use This
IntPtr FocusedWindow = BFS.Window.GetFocusedWindow();
BFS.Window.MoveToMonitor(2, FocusedWindow);
BFS.General.ThreadWait(1000);
//Send the CTRL+H key
BFS.Input.SendKeys("^{H}");
//Send the F11 key
//BFS.Input.SendKeys("{VK_122}");
//Play/Pause
//BFS.Input.SendKeys("{VK_179}");
}
}