Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Increase Application Volume

Description
This script will increase the volume of the application that currently has focus.
Language
C#.net
Minimum Version
Created By
Tyler Holmes60929
Contributors
-
Date Created
Feb 24, 2021
Date Last Modified
Feb 24, 2021

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
		uint appID = BFS.Application.GetAppIDByWindow(windowHandle);
		float changeBy = 0.02f;
		float currentVol = (float)BFS.Audio.GetApplicationVolume(appID);

		BFS.Audio.SetApplicationVolume(appID, (decimal)(currentVol + changeBy));
	}
}