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!

Show/Hide Firefox Window

Description
This script will toggle transparency on the Firefox window.
Language
C#.net
Minimum Version
Created By
Tomasz Janikowski
Contributors
-
Date Created
Jun 11, 2018
Date Last Modified
Jun 11, 2018

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
		IntPtr window_by_file = BFS.Application.GetMainWindowByFile ("*Firefox*");
		IntPtr window_by_title = BFS.Window.GetWindowByText ("*Firefox*");
		decimal alpha = BFS.Window.GetTransparency(BFS.Window.GetWindowByText("*Firefox*"));
		if (alpha < 100m)
		{
			alpha = 100m;
		}
		else
		{
			alpha = 2m;
		}
	//alpha = Math.Round(alpha/10) * 10m;
	BFS.Window.SetTransparency(BFS.Window.GetWindowByText("*Firefox*"), Math.Floor(alpha));
	}
}