Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
Maggew.com
31 discussion posts
How do I restore window if app is minimized to system tray?
Is there such a thing as BFS.Window.IsMinimizedToTrey(mainWindow)?

---

I'm using this as reference: https://www.displayfusion.com/ScriptedFunctions/View/?ID=82b0cb93-5575-47b6-8f36-e176e90bfbc3
Oct 11, 2017 (modified Oct 11, 2017)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
There isn't a way to check if a window is minimized to the tray, but you can restore it using the normal method:

BFS.Window.Restore(mainWindow);
Oct 11, 2017  • #2
User Image
Maggew.com
31 discussion posts
Of course BFS.Window.Restore(mainWindow); is available but it doesn't work. I linked the script I was using as a foundation and it has that exact snippet you shared but it doesn't work.

If Skype is minimized to system to tray, and not in taskbar... how do I restore Skype?

notice the part:

//if the app is minimized, restore it

How do I make it restore if app is minimized to system tray?
Oct 11, 2017  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ahhh, my bad. I was testing it with a window that was minimized to the tray using the DisplayFusion "Minimize Window to System Tray" function. When Skype is minimized to the tray, the window doesn't actually exist, so there's no way to restore it from a script. The only way would be to have the script double-click on the Skype tray icon. If the tray icon is always in the same spot, that should technically be possible, like so:

Code

BFS.Input.SetMousePosition(3269, 2137);
BFS.Input.LeftClickMouse();
BFS.Input.LeftClickMouse();
Oct 12, 2017  • #4
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We've just released a new DisplayFusion beta version and there's now a scripting function for checking whether a window is visible:

Code

BFS.Window.IsVisible(windowHandle)
May 4, 2018 (modified May 4, 2018)  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(1)  Login to Vote(-)