Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

FrankTR's profile on WallpaperFusion.com
I'm trying to set up a few Windows Position Profiles and it seems to work OK.
But there is one thing missing or, more probably, I haven't found out how to set up.

I want all programs that are not part of the position profile to become minimized. Is there an option to do that?
Feb 21, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
There isn't a way to do that at the moment, no. We've added this to our feature request list and we'll be sure to let you know if/when we're able to implement it.

Thanks!
Feb 22, 2019  • #2
FrankTR's profile on WallpaperFusion.com
Thanks for the feedback, Keith.

I made an AutoHotKey-script that helps me do the action I wanted.

Code

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

^!Numpad1::
Send, #d
Sleep, 100
Send, ^#!{Numpad1}
return

^!Numpad3::
Send, #d
Sleep, 100
Send, ^#!{Numpad3}
return


I set the shortcuts in DisplayFusion to be Ctrl+Win+Alt+NumPad1/3.
Then in AutoHotKey I use the shortcuts Ctrl+Alt+NumPad1/3 to first send a Win+D to minimize all programs and then send the correct shortcut to DisplayFusion.

It sort of works, but not 100% perfect, so would be nice if this could be implemented directly in DisplayFusion.
Feb 26, 2019 (modified Feb 26, 2019)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks for sharing that workaround! It clued me in that you could actually implement that in DisplayFusion as well using a Scripted Function.

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Send Win + D
        BFS.Input.SendKeys("{WIN}({VK_68})");

        // Load the Profile
        BFS.DisplayFusion.RunFunction("Load Window Position Profiles: Profile Name");
    }
}
Feb 26, 2019  • #4
FrankTR's profile on WallpaperFusion.com
Quote:
Thanks for sharing that workaround! It clued me in that you could actually implement that in DisplayFusion as well using a Scripted Function.


Thanks!
I knew about the scripting in DisplayFusion, but haven't looked into it yet, so figured I'd fix it quicker in AHK.

But now I'll for sure look into DFs scripting functionality.
Mar 5, 2019  • #5
User Image
Alvintc
4 discussion posts
So this is exactly what I need but for some reason it's not loading the profile for me.
I have a profile called "calls" which works perfectly when I load it from the menu (or set it up as the click option), but I need to minimise everything first..

I've tried:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Send Win + D
        BFS.Input.SendKeys("{WIN}({VK_68})");
        BFS.DisplayFusion.RunFunction("Load Window Position Profiles: Calls");
    }
}

and:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // Send Win + D
        BFS.Input.SendKeys("{WIN}({VK_68})");
        // Load the Profile
        BFS.DisplayFusion.LoadWindowPositionProfile("Calls");
    }
}

Neither actually load everything... but the minimise is working fine!

I've also tried adding waits in there but no joy so far. Anyone any ideas?
Apr 20, 2021  • #6
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

If you have that line to load your window position profile by itself, in a separate script, does it work okay?

Thanks!
Apr 20, 2021  • #7
User Image
Alvintc
4 discussion posts
Oddly enough, that's something I never thought to test. It did lead me down the right path though!

Running just the profile worked fine
Turns out I needed a longer wait.

Putting a 2000ms wait in between the minimise & profile load got it!

Thanks!
Apr 22, 2021  • #8
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

Glad to hear you got it working! If you have any other questions, feel free to reach out to us.

Thanks!
Apr 22, 2021  • #9
User Image
Jose51754
1 discussion post
Is this script availible for download? I don't know any programming at all. I tried to copy and paste the script in both the VB and C# but it just gives me a bunch of error at the bottom. Can you give a step by step how to do this? Or better still is it possible to just let us have a check box to select in the windows position profile to minimize all before loading the position profile.
Nov 29, 2022  • #10
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
I've attached the script below, with the added 2 second wait timer in between. You can download it and import it via the DisplayFusion Settings > Functions > Scripted Function > Import Scripted Functions.

Thanks!
• Attachment: Minimize Windows Then Load WPP.dfscript [2,071 bytes]
Nov 29, 2022  • #11
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)