Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
lucaabc
3 discussion posts
I have a monitor set up with two monitors at my desk, and 3 monitors behind it for racing. I have one profile called 'Desk' and one profile called 'Sim Racing' for this. I've easily set up Custom Functions to automatically open 6 applications I use for racing (using the 'Launch Application' function) when I press the hotkey (control shift F2) to change to my 'Sim Racing' monitor profile.

However, I cannot figure out how to reverse this - so that when I press my 'Desk' monitor profile hotkey (control shift F1), those same 6 applications fully close. Is there a simple function I may be missing?

I am a full novice to DisplayFusion and coding generally, so I unfortunately don't have much insight into how to write the code that may be needed to create this type of custom function.

Thanks in advance for any help!
13 days ago  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've posted a script that lets you fill in the process names of the apps that you want to close and then it will find the main window for the app and close it. You can download it on the Settings > Functions tab with Scripted Functions > Download Scripted. It's named "Close Specific Application Windows."

Note that it will only send the "close" API call to the window. If it's an app that closes to the system tray, it won't fully exit the app. That could only be done by killing the process, which isn't a great way to exit a running program :)
12 days ago (modified 12 days ago)  • #2
User Image
lucaabc
3 discussion posts
Thank you, Keith!

This function works perfectly after adding the .exes I'd like to close and when I run it by itself, but it doesn't work as intended when I add it as a trigger to run when my monitor profile changes to 'Desk'. Do you know why that may be? I've done the following steps:

Settings > Triggers > Add > Under Event; When Monitor Profile Changed > Under Monitor Profile; select 'Desk' > Add > Run Fuction > Selected the function you've posted > Ok.
7 days ago  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
That's strange! If you add a "Show notification" action to the Trigger rule, do you see the tray notification when switching to the profile?
5 days ago  • #4
User Image
lucaabc
3 discussion posts
I do not see a notification after adding one when switching to the profile.

I tried to troubleshoot a bit and also found that when I directly add a Key Combination to call/start this function, it does not work as intended (but again, running the function via the window where it is open/I can see the code works). Not sure if that is helpful at all in troubleshooting. Thanks again for your help with this!
1 day ago (modified 1 day ago)  • #5
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)
This site uses cookies. By continuing to use this website, you agree to their use.
I Understand  •  View Terms of Service