Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
trav1
12 discussion posts
Is there a way to know when a load monitor profile via script completes.

I am writing a script where I want to load the monitor profile and then load an app BUT I want to make sure the monitors are all on before I launch the app.... It usually takes a few seconds or so for the monitors to all load.... anyway I can be precise in my script with launching my app...?

script so far looks like this:

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"){
            BFS.DisplayFusion.LoadMonitorProfile("3_on");
        }
        //Need to wait
        //launch app
        //maximize app window
    }
}
Nov 13, 2020  • #1
User Image
trav1
12 discussion posts
Wondering if I could use this in some way...

Code

bool ok = BFS.DisplayFusion.RunFunctionAndWait("My Load Monitor Profile");


Thought being to make a script that loads the monitor profile and use RunFunctionAndWait to call it in a 2nd script.
Nov 13, 2020  • #2
User Image
trav1
12 discussion posts
I ended up using...

Code

BFS.DisplayFusion.RunFunctionAndWait("Load Monitor Profile: 3_on");


and waited on the built in function...
Nov 13, 2020  • #3
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)