Save up to 50% off any of our desktop apps in our 2021 spring sale, including
DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!

Title

Message

Confirm

<< DiscussionsReply

Running function when window is not focused.

BanditosDoritos
1 discussion post
Hey there, I recently bought this program and so far I am extremely satisfied with it. I want to make it so that when Final Fantasy XIV's window is focused, the key combinations are toggled off and when Final Fantasy XIV's window is not focused, the key combinations are toggled on. Is there any way of making this work?

Thanks, BanditosDoritos.
Mar 24, 2021  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

This can get a bit tricky, as the function for enabling / disabling key combinations is a toggle.

If you want it purely for focused and unfocused, you can create a trigger to toggle it when the game is focused, and another trigger to toggle it again when any other application is focused. Just be careful, if you click on multiple windows outside of the game, it will continue to toggle and untoggle.

It might be easier to have the trigger fire off the window created for the game, so your key combinations are disabled while the game is running, and then create another trigger to re-enable the keys when the game is destroyed, although I understand that may not be exactly what your looking for.

Hope that helps!
Mar 24, 2021  • #2
Hollo
57 discussion posts
Hey,

I wanted to do something similar recently and what I came up with is a loop which starts when that particular window is focused and then checks if it's still the focused window every second (of course you should change the interval depending on how fast-acting you want it to be and how much CPU overhead you're willing to sacrifice).
But, if there are only a few key combinations that bother you when ingame, if I were you, I'd write a one-liner in AHK which disables those when the game is active.

Hope this helps.
Mar 29, 2021  • #3
Was this helpful?    
<< DiscussionsReply