Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Kylescousin
69 discussion posts
Hi,

I downloaded this custom script that prompts you to select an audio device.
When clicking the 'run script' in the edit dialog, it shows a select box with the audio devices. But when I press the key combo outside displayfusion settings, it just prompts "Please select an audio device", but without a select box.

This is the script:
using System;
using System.Drawing;

public static class DisplayFusionFunction
{
public static void Run()
{
// Specify your exact audio device names here (as seen in the tray > Audio Devices menu)
string[] audioDevices = {
"Logitech G930 Gaming Headset",
"Realtek High Definition Audio"
};

// Prompt to select an audio device
string selectedAudioDevice = BFS.Dialog.GetUserInputList("Please select an audio device to switch to.", audioDevices);

// Set the selected device as the default playback device
BFS.Audio.SetDefaultPlaybackSounds(selectedAudioDevice);
}
}
Passionate about technology, programming, Laravel, Linux, Reddit, running, cycling, swimming. I run a social platform called Grepless.com
Jul 30, 2016  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We were able to reproduce this issue here, and I've added it to our list. We'll be sure to let you know as soon as we're able to fix it up :)

Thanks!
Aug 4, 2016 (modified Aug 4, 2016)  • #2
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
The issue will be fixed in the next build, but you can also update your script so that you don't need to hard-code your audio devices:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run()
    {
        // Prompt to select an audio device
        string selectedAudioDevice = BFS.Dialog.GetUserInputList("Please select an audio device:", BFS.Audio.GetPlaybackDevices());

        // Set the selected device as the default playback device
        BFS.Audio.SetDefaultPlaybackSounds(selectedAudioDevice);
    }
}
Aug 4, 2016  • #3
User Image
Kylescousin
69 discussion posts
Thanks Keith!

Yes please also make it so you don't have to hardcode the audio devices :)
Passionate about technology, programming, Laravel, Linux, Reddit, running, cycling, swimming. I run a social platform called Grepless.com
Aug 4, 2016  • #4
User Image
Kylescousin
69 discussion posts
Works in the beta from august 4!
Thanks
Passionate about technology, programming, Laravel, Linux, Reddit, running, cycling, swimming. I run a social platform called Grepless.com
Aug 5, 2016  • #5
User Image
Kylescousin
69 discussion posts
I was too quick to celebrate, the script shows the audio devices, but it doesn't change when you select a different one. Jon Tackabury's script does work.
Passionate about technology, programming, Laravel, Linux, Reddit, running, cycling, swimming. I run a social platform called Grepless.com
Aug 5, 2016 (modified Aug 5, 2016)  • #6
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Your original script works for me here. Are the device names in your script exactly the same as what shows up in the list when you use Jon's script? On mine, I have to use these in your script, just using the name in the brackets doesn't work:

Speakers / Headphones (Realtek High Definition Audio Device)
Speakers (Plantronics .Audio 995 DSP)
Aug 5, 2016  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Last month, we released DisplayFusion 8.0, and this issue should be all fixed up. If you still have any trouble with 8.0, please let us know!

Thanks!
Sep 9, 2016  • #8
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)