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?
Save up to 50% on our desktop apps during our Year End Sale!Save up to 50% on our desktop apps during our Year End Sale, including DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!Save up to 50% on our desktop apps during our Year End Sale!

Increase Application Volume

Description
This script increases the volume of the focused window.
Language
C#.net
Minimum Version
Created By
Renan Gonçalves Micheletti
Contributors
-
Date Created
Feb 23, 2022
Date Last Modified
Feb 23, 2022

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);
		const decimal changeBy = 0.02m;

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