Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Maggew.com
31 discussion posts
I didn't search here before I posted, but I find good script.

Question: How do I toggle border color to go from Purple to None (or transparent) using hotkey? Any ideas?

https://www.displayfusion.com/ScriptedFunctions/View/?ID=28e56bd4-5607-42c5-8486-01d7afa8e8a1 (purple highlight)

So if I bind hotkey, I can use same hotkey to remove border (toggle highlight).

--- OLD QUESTION

May you please help me? I wish to use Highlight Window and make it so DF remembers previous selected border color.



Perhaps you already have a script you can share or maybe option exists but I ignore it.
Jan 24, 2018 (modified Jan 24, 2018)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
There isn't really a way to do either of those things at the moment, unfortunately. Are you just needing to highlight a single window, or do you highlight a few?
Jan 26, 2018  • #2
User Image
Maggew.com
31 discussion posts
I was looking to improve my efficiency when I record video tutorials using screencast-o-matic.

I thought, "Hey..it would be cool if I could toggle border highlight on focused window while recording a tutorial to give user focus".

After testing the highlight scripts on the macro forums, the purple border highlight script is the best. The thing is, once the function is ran, it doesn't turn off. That's the way it seems... kinda disappointing. You can highlight window but unable to remove it.

Thanks for the feedback brobro.

^ _ ^
Jan 26, 2018 (modified Jan 26, 2018)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ah ok! So ultimately you want DF to just automatically highlight whichever window is focused?
Jan 30, 2018  • #4
User Image
Maggew.com
31 discussion posts
Exactly. Automatically border highlight active / focused window with toggle hotkey to enable / disable.
Jan 30, 2018  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, could you try updating your Highlight Window Purple script with this code?

Code

using System;
using System.Drawing;

// The 'windowHandle' parameter will contain the window handle for the:
// - Active window when run by hotkey
// - Window Location target when run by a Window Location 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)
    {    
        //remove all highlights
        BFS.DisplayFusion.RunFunction("Highlight Window: Disable All Highlights");
    
        //exit function if we couldn't get the window or if it's an explorer or DisplayFusion window
        if (windowHandle == IntPtr.Zero || BFS.Application.GetMainFileByWindow(windowHandle).Contains("explorer.exe") || BFS.Application.GetMainFileByWindow(windowHandle).Contains("DisplayFusion.exe"))
            return;

        //generate color from hex > purple
        Color myDarkOrchid1 = ColorTranslator.FromHtml("#BF3EFF");

        //set the color of the window highlight
        BFS.Window.RemoveWindowHighlight(windowHandle);
        BFS.Window.SetWindowHighlight(windowHandle, myDarkOrchid1);
    }
}


Then create a Trigger rule like the attached screenshot?
• Attachment: Trigger.jpg [184,587 bytes]
Trigger.jpg
Trigger.jpg
Jan 31, 2018  • #6
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(2)  Login to Vote(-)