I've come up with a bit of a work around that seems to be doing the job.
I've changed the trigger to use
Window Text and
Window Class as these seem to consistently catch the program.
I've also changed the trigger to use
Window Focused like you suggested.
I've also created an AHK script that launches a batch file that I've converted to a .exe
I had to go with AHK instead of creating a Custom Function from within Triggers because Window Created and Process Created still doesn't work.
DisplayFusion detects the converted batch file and applies the Compatibility settings that I want applied when the game is opened.
The AHK then kills the converted batch file when the game is closed.
In my testing I noticed that most of the time the game has no Path, Version, Build Time, Description etc. in my task manager (Process Explorer). Which probably has something to do with why DisplayFusion is failing to detect it.
This is the AHK script, just in case anyone needs to use this workaround in the future.
It uses a utility called PsKill which you can find on Microsoft's Windows Sysinternals site.
#Persistent
SetTimer, CheckForGame, 5000, On
CheckForGame:
Process, Exist, Game.exe
If ErrorLevel <> 0
{
Process, Exist, BatchFile.exe
If not ErrorLevel
Run D:\Tools\Test\BatchFile.exe
}
Else
{
Process, Exist, BatchFile.exe
If ErrorLevel <> 0
Run D:\Tools\pskill.exe -t %ErrorLevel%
}
return
The batch file is literally just
pause. The .bat to .exe converter that I used has an option to allow the batch file window to go invisible and run in the background.