Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
trav1
12 discussion posts
I want to change monitor profiles when particular apps are opened.
EXAMPLE- Open After Effects ... Load Profile 1

I assumed this would be possible using triggers but I am not clear on how to accomplish it. Can I get some suggestions?
Nov 12, 2020  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

If you head to the triggers section, you can create a new trigger. You'll want to use the "Window Created" event (this is set by default). You can then select the application you want in the "Process Filename" box. Finally, you can add the "Run Function" action, and select the monitor profile you would like to load when the application is run.

We also have a help guide found here if you would like to look into it a bit further: https://www.displayfusion.com/Discussions/View/working-with-triggers/?ID=43b31609-4ec6-4478-99f8-a1f11e9793f7#first

Hope this helps!
Nov 12, 2020  • #2
User Image
trav1
12 discussion posts
Hmmm... this kind of works but I run into the issue of having my windows all messed up because the app opens essentially before the screens.

I think I need a custom script that loads the monitor profile then launches the app...

I am thinking...

1. Check if monitor profile loaded
2. load or dont need to load profile
3. launch app
4. maximize window of app

Then I would attach that to a shortcut and use the commandline interface to run the function....

I will try to make this and post here...
Nov 13, 2020 (modified Nov 13, 2020)  • #3
User Image
trav1
12 discussion posts
I ended up using....

Code

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)
    {
        //Gets name of current monitor profile
        //After effects needs profile named 3_on
        string profileName = BFS.DisplayFusion.GetCurrentMonitorProfile();
        
        if (profileName != "3_on"){
            //Need to wait
            BFS.DisplayFusion.RunFunctionAndWait("Load Monitor Profile: 3_on");
        }
        BFS.DisplayFusion.RunFunctionAndWait("Launch-AfterEffects");
    }
}
Nov 13, 2020  • #4
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

Glad to hear you found a solution! If you have any other questions, feel free to reach out to us.

Thanks!
Nov 13, 2020  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)