Want to earn a free DisplayFusion Pro license? We're looking for DisplayFusion translators!
<< DiscussionsReply

Script to move windows on Monitors

Avatar from Gravatar.com
Jan Müller40182
1 discussion post
Hey Guys could use some help :).
We have a script to move some Acrobat Reader Files to a specific Monitor but can't figure out whats wrong with it atm.
Heres the script.
Maybe one of you knows whats wrong with it.

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)
if (BFS.Window.GetText(windowHandle).Contains("Adobe Acrobat Reader DC - 1"))
BFS.Window.MoveToMonitorMaximized(1, windowHandle);
else if (BFS.Window.GetText(windowHandle).Contains("Adobe Acrobat Reader DC - 2"))
BFS.Window.MoveToMonitorMaximized(2, windowHandle);
else if (BFS.Window.GetText(windowHandle).Contains("Adobe Acrobat Reader DC - 3"))
BFS.Window.MoveToMonitorMaximized(3, windowHandle);
Jan 5, 2018  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
It might be that the text you're checking for is backwards. On my system, the window text for the Adobe Reader window is like this:

"Filename - Adobe Acrobat Reader DC"
Jan 5, 2018  • #2
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply