Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
CloudShow Manager
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
TrayStatus
VoiceBot
WallpaperFusion
Display
Fusion
by Binary Fortress Software
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
Features
Free vs Pro
More
Screenshots
Scripted Functions (Macros)
Languages
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Purchase
Login / Register
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Toggle Start/Minimize/Restore Windows Terminal
Return to DisplayFusion Scripted Functions (Macros)
Description
Just a quick mod to ZipD's Whatsapp toggle script to do the same with the new Windows Terminal app.
Language
C#.net
Minimum Version
9.7.1+
Created By
István Farmosi
Contributors
-
Date Created
Apr 9, 2021
Date Last Modified
Apr 9, 2021
Scripted Function (Macro) Code
Copy
Select All
/* * Heavily based on ZipD's "Toggle Start/Minimize/Restore Whatsapp" script - Thanks mate :) * * NOTE TO USERS * * You will most likely need to change the path at the end of the script. * You can figure out the right value by finding WindowsTerminal.exe in * Task Manager then selecting "Open File Location" in the context menu. Hold * shift while right clicking in the Explorer window and select "Copy as path", * then you can just paste that right in after the @ sign. * * OPTIONAL MODIFICATION * By default, this script will hide the terminal from the windows taskbar * when you hide the terminal. You can change this by simply removing the * line that calls "BFS.Window.RemoveFromWindowsTaskbar(hwnd);". * */ using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { bool isRunning = BFS.Application.IsAppRunningByFile("*WindowsTerminal.exe"); //Check if running if(isRunning) { //Get the window handle IntPtr hwnd = BFS.Application.GetMainWindowByFile("*WindowsTerminal.exe"); //Check if already minimized bool isMinimized = BFS.Window.IsMinimized(hwnd); if(isMinimized) { //Restore BFS.Window.Restore(hwnd); } else { //Minimize BFS.Window.Minimize(hwnd); BFS.Window.RemoveFromWindowsTaskbar(hwnd); } } else { //Start if not running BFS.Application.Start(@"C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.7.572.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe"); } } }