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
Beak
37 discussion posts
­
­
I have two similar triggers for Apex Legends that I run through Steam: One for Process Created and one for Process ended.
­
When I launch Apex, the process created triggers correctly as the Easy Anti-Cheat window pops up. Then a few seconds later, the Process Ended triggers way too soon (at this point the game is still launching). Then again, the Process Created triggers a few seconds later, before the game actually finally launches for real and then the Process Created triggers again, but it kind of has a hard time and doesn't fire every function that it's supposed to (I think because of the Process Ended trigger from a few seconds before).
­
It's really obnoxious because all I want is the Process Created to trigger only one time when I launch Apex and for the Process Ended to trigger only one time when I close Apex.
­
How can I resolve this weird behavior? Have I configured it wrong? Is there a bug? Interestingly enough, the issue cannot be reproduced while any DisplayFusion UI window is running somewhere on my desktop. The issue can only be reproduced while no DisplayFusion window is open (i.e. it's only running in the system tray).
­
Attached are screenshots of my two trigger configs as well as the debug log I generated while reproducing the issue.
­
­
• Attachment [protected]: 2021-10-19_DisplayFusion_Process-Created-Trigger.png [26,830 bytes]
• Attachment [protected]: 2021-10-19_DisplayFusion_Process-Ended-Trigger.png [25,792 bytes]
• Attachment [protected]: 2021-10-19_Process Created and Ended triggers_DisplayFusionDebugInfo.zip [124,755 bytes]
Oct 19, 2021 (modified Oct 19, 2021)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Are you able to keep Task Manager open on another monitor while you launch the game? I'm wondering if the PID for r5apex.exe changes at all after you launch it? e.g. does it start as one number, then change again some time after it's opened?
Oct 19, 2021  • #2
User Image
Beak
37 discussion posts
Quote:
Are you able to keep Task Manager open on another monitor while you launch the game? I'm wondering if the PID for r5apex.exe changes at all after you launch it? e.g. does it start as one number, then change again some time after it's opened?

­
Task Manager didn't work as I wanted it to but I did use ProcessExplorer. Your theory of multiple PIDs turned out to be correct.
­
As you can see in the two new screenshots I've attached, during just the initial Easy Anti-Cheat stage of launching Apex, an initial r5apex.exe PID starts only to be killed (PID 2088 in red) to make way for a new one that sticks around (PID 26548 in green).
­
What can be done about this? One idea that I could see working around this would be to make the Process Created trigger only match once the PID for a specified executable reaches a certain age. For example, have the Process Created only match once the PID reaches 20000ms in age (or whatever age I choose to input). Is this already a feature? If not, is there some other solution that we can come up with to solve my issue? (And why would this issue not be able to be reproduced whenever the DisplayFusion UI is open?)
• Attachment [protected]: Apex-PID_1.png [689,488 bytes]
• Attachment [protected]: Apex-PID_2.png [668,738 bytes]
Oct 20, 2021 (modified Oct 20, 2021)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I can't think of a good way to achieve this with what's already in DisplayFusion. I'll add this to our improvements list and we'll see what we can come up with. If we're able to make some progress on it, we'll be sure to let you know.

Thanks!
Oct 22, 2021  • #4
User Image
Beak
37 discussion posts
Quote:
I can't think of a good way to achieve this with what's already in DisplayFusion. I'll add this to our improvements list and we'll see what we can come up with. If we're able to make some progress on it, we'll be sure to let you know.
Thanks!

Do you have any idea why the trigger works literally exactly as I want it to as long as one of the DF windows is open?
Oct 23, 2021  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Not a clue, but I see that Apex Legends is free to play so I'm going to install it and do some testing here. I'll keep you posted on what I find out.
Oct 26, 2021  • #6
User Image
Beak
37 discussion posts
Quote:
Not a clue, but I see that Apex Legends is free to play so I'm going to install it and do some testing here. I'll keep you posted on what I find out.

Ok, thank you.
Oct 26, 2021  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, so interestingly, I can't reproduce this issue. The Process Created and Process Ended triggers only fire once when I test it here, with or without the DF settings window open.

Do you have Apex Legends installed through Steam, or something else?
Oct 28, 2021  • #8
User Image
Beak
37 discussion posts
Quote:
Ok, so interestingly, I can't reproduce this issue. The Process Created and Process Ended triggers only fire once when I test it here, with or without the DF settings window open.
Do you have Apex Legends installed through Steam, or something else?

Steam
Oct 28, 2021  • #9
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, I was able to sort of reproduce this issue here. I'll do some more testing and see what I can find out.
Oct 28, 2021  • #10
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Quick update on this. We have an idea on how we can make the process age condition work for this scenario and have added it to our list. We'll be sure to let you know if/when we're able to implement it.

Thanks!
Dec 2, 2021  • #11
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I had another thought on this, but for some reason I can't reproduce the multiple process start/end Triggers for Apex Legends any more.

If you change your "Process Created" Trigger to a "Window Created" Trigger, and set these two conditions:

Window Text: "Apex Legends"
Window Class: "Respawn001"

Does it still fire multiple times? Only looking to test to see if that fixes the trigger for starting Apex. If it does, I have an idea for fixing the trigger for ending Apex as well.
Dec 2, 2021  • #12
User Image
Beak
37 discussion posts
Quote:
I had another thought on this, but for some reason I can't reproduce the multiple process start/end Triggers for Apex Legends any more.

If you change your "Process Created" Trigger to a "Window Created" Trigger, and set these two conditions:

Window Text: "Apex Legends"
Window Class: "Respawn001"

Does it still fire multiple times? Only looking to test to see if that fixes the trigger for starting Apex. If it does, I have an idea for fixing the trigger for ending Apex as well.


It does still fire multiple times but it's worse than the other one.

When using the Window Created as you instructed, it seems to run multiple times but does like half the job. The first time it triggers is when the Easy Anti-Cheat window is created, but it only runs the first action in the trigger (a custom function that toggles something on). Then when the actual Apex window is created, the trigger runs again, and runs every function. But then my first function gets toggled off since it ran prematurely when the Easy Anti-Cheat triggered the Window Created the first time around. At least when I use the Process Created trigger, it fires all my functions once (which runs some custom functions that toggle a few things on), then it runs the Process Ended (which runs a custom function that toggles those off), then it runs the Process Created again (which toggles them on as I want). The large majority of the time, all the functions I want to run end up do running the second time the Process Created is triggered.
Dec 3, 2021  • #13
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, thanks for trying that out. Not sure why I can't reproduce it here any more, but if/when we're able to make the changes for checking process age, we'll be sure to let you know.

Thanks!
Dec 3, 2021  • #14
User Image
Beak
37 discussion posts
Quote:
Ok, thanks for trying that out. Not sure why I can't reproduce it here any more, but if/when we're able to make the changes for checking process age, we'll be sure to let you know.

Thanks!


Ok. I have another game you could try to replicate this issue with... Halo: Infinite. The multiplayer is totally free and it basically behaves the same way as Apex.
Dec 7, 2021  • #15
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok thanks! I'll give that a try as well.
Dec 7, 2021  • #16
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Finally had a chance to test out Halo: Infinite and I can't reproduce it with that either. I wonder what's different about our two systems but I can't think of what it could even be :(
Jan 20, 2022  • #17
User Image
Beak
37 discussion posts
I'm wondering if the devs have made any headway whatsoever in fixing this issue? It's gone from just being annoying to being a hinderance.
As of the last week, my triggers I use for Apex fire with an extremely long delay. I'm talking like a full 1 to 3 minutes (it feels like). Sometimes the trigger fires right when it should but one or two of the functions within the trigger don't fire till a few minutes later. It's now at the point of not being usable. This wouldn't be near as bad if these triggers didn't fire multiple times as Apex started up.
I have a suggestion for the devs that I believe would completely resolve my issue...
On my Android phone I use an app called Tasker. You use it to create Profiles that perform specified Tasks whenever specified Conditions are met. It's an extremely powerful and feature-rich automation tool. One of those features is the ability to enable a Cooldown Time on any profiles.
Here are a couple of screenshots:
TaskerCooldownTime1
TaskerCooldownTime2
As you can see in that second screenshot, the Cooldown Time's description says:
> The times after the profile has become active before it can again become active.
In other words, the profile can't fire again till the cooldown has ended.
Is there any way at all that the devs could implement a similar cooldown feature for triggers? I believe this would resolve my problem because with just a 1 or 2 minute cooldown, both the Process Started and Process Ended triggers wouldn't fire off a handful of times while Apex is launching.
• Attachment [protected]: TaskerCooldownTime1.png [198,971 bytes]
• Attachment [protected]: TaskerCooldownTime2.png [175,608 bytes]
Apr 14, 2022 (modified Apr 14, 2022)  • #18
Keith Lammers (BFS)'s profile on WallpaperFusion.com
That's an interesting idea, I will check in with them on that.
Apr 14, 2022  • #19
User Image
Beak
37 discussion posts
Quote:
That's an interesting idea, I will check in with them on that.


Thank you. In the mean time, I need a reliable workaround. The Window Created trigger works flawlessly but Window Destroyed has never worked and I can't figure out why.
Apr 14, 2022  • #20
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I could write a scripted function that just runs in the background looking for the game process, when it finds the game process it runs your functions, then when the process goes away, it runs the other functions. If the script is set to loop every 10 or 15 seconds it shouldn't have much of an impact on CPU.

Do you want to try that?
Apr 18, 2022  • #21
User Image
Beak
37 discussion posts
Quote:
I could write a scripted function that just runs in the background looking for the game process, when it finds the game process it runs your functions, then when the process goes away, it runs the other functions. If the script is set to loop every 10 or 15 seconds it shouldn't have much of an impact on CPU.

Do you want to try that?


Yes please, that would be great. Thank you.
Apr 29, 2022  • #22
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, give this one a try. On line 36, set the function you want to run when the process has been detected (you can add more by copying that line).

On line 53, set the function(s) you want to run when the process is gone.

Hope this helps!
• Attachment: Do stuff on process start_end.dfscript [4,520 bytes]
Apr 29, 2022  • #23
User Image
Beak
37 discussion posts
Quote:
Ok, give this one a try. On line 36, set the function you want to run when the process has been detected (you can add more by copying that line).
On line 53, set the function(s) you want to run when the process is gone.
Hope this helps!

How do I set the function to constantly run in the background? And how do I add wait functions? (I've attached a screenshot of the trigger that has all the functions I need to run when Apex starts up.)
• Attachment [protected]: Edit Trigger _ DisplayFusion Pro on Steam 9.9.png [38,061 bytes]
Apr 29, 2022 (modified Apr 29, 2022)  • #24
Keith Lammers (BFS)'s profile on WallpaperFusion.com
The script is setup to run continuously in the background, so you can start it manually or have it run on a "DisplayFusion Starts" trigger.

You can add wait times to the script like this:

BFS.General.ThreadWait(3000);


So it would look something like this:

Code

BFS.DisplayFusion.RunFunctionAndWait("Function Name 1");
BFS.General.ThreadWait(3000);
BFS.DisplayFusion.RunFunctionAndWait("Function Name 2");
May 2, 2022 (modified May 2, 2022)  • #25
User Image
Beak
37 discussion posts
I set it up to run when DF starts like you suggested. Aside from it occasionally not actually running when DF starts, it's been working perfectly for me. Until DF can be updated with some kind of trigger cooldown (as I had suggested before), this seems to be the best bandaid fix. Thanks for your help with this.
Jun 18, 2022  • #26
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, glad to hear that's mostly working. We will definitely post an update if/when we're able to add a cooldown timer to the triggers.

Thanks!
Jun 20, 2022  • #27
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)