Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Michel Martel
1 discussion post
I'm using a modified scripted function of the 'Change Audio Device by Wildcard'.

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        string[] audioDevices = BFS.Audio.GetPlaybackDevices();
        foreach (string device in audioDevices)
        {
            if (device.Contains("Corsair")){
                BFS.Audio.SetDefaultPlaybackSounds(device);
                BFS.Dialog.ShowTrayMessage("Audio set to Corsair Headset");
            }
        }
    }
}


The only modification really is this line

Code

BFS.Dialog.ShowTrayMessage("Audio set to Corsair Headset");


The script changes the audio device successfully but fails to display the tray message toast notification. Nothing shows in the notification panel either.

The above script was tested successfully on Win 10 DF9.9
Jan 25, 2022  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Michel,

The script looks okay, do any tray notifications work for you? For example if you run the "Set Next Playback Device as Default" function, does anything appear?

Thanks!
Jan 27, 2022  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)