<< DiscussionsReply

Trigger when Window loses focus

Avatar from Gravatar.com
5 discussion posts
I want a certain window (Spotify) to automatically close/minimise when it loses focus, but in the GUI there's only a Trigger for when a window gains focus. What would be the easiest way to do this?
May 10, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Windows doesn't send a global message when an application loses focus, so it's not possible to add as a Trigger event.

You could have a Window Focused Trigger that uses *.* as the application, and runs a Scripted Function that does this:
  • Check if window that got focus was Spotify
  • If not, check if Spotify is visible
  • If so, minimize Spotify

That would be a bit resource intensive though, since it would have to run through that script every time a different window gets focus.
May 13, 2019  • #2
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply