So I use DisplayFusion to automate a ridiculous amount of things, and I found out I can get it to minimize windows to the system tray that otherwise don't support that functionality. I want to setup a batch file to constantly ping my router to help stabilize my internet connection. I can get DF to launch the batch file, and if I use ctrl+win+T it minimizes the window to the system tray where it is out of sight and out of mind.
I've tried doing a mix between scripted functions and a trigger to launch the batch file and then minimize it to the system tray, but it fails at that last part.
I am using this script to focus cmd
BFS.Window.Focus(BFS.Application.GetMainWindowByFile("*cmd.exe"));
I would have assumed that after the window is focused it is the window that would be affected by the "Minimize Window to System Tray" function being executed directly afterwards, but that doesn't appear to the case. If I manually use ctrl+win+T then it works after the window is focused.
I looked through
https://www.displayfusion.com/ScriptedFunctions/Help#bfs_window for a function I could script to specifically minimize cmd to tray but couldn't find one.
A screenshot of the trigger setup I was trying to use is attached. It works exactly how I expected it to until the last step. It's not the most elegant solution, but I want to have the whole process done automatically when I start up my PC and not have a cmd window open on my taskbar the whole time.
Thank you, DisplayFusion is surprisingly powerful for all the weird use cases I use it for. Hope this is possible.