Categories > Coding > C# >
Why does this work? (auto attach)
Posted
I've been using this method to find when roblox is fully opened for a while already.
while (true)
{
Process[] procs = Process.GetProcessesByName("RobloxPlayerBeta");
if (procs.Length > 0 && procs[0].MainWindowHandle != IntPtr.Zero) Console.WriteLine("Roblox opened");
else Console.WriteLine("Roblox not opened");
Thread.Sleep(1000);
}
My question is, why does this work? Because if the reasons behind this are flimsy and unreliable, then I most likely won't use it anymore (although it has yet to fail me). I could just use Process Watcher but this is much more compact imo.
Replied
@63568 Woah, I never thought this was a thing I would always just check for the number of processes.
Cancel
Post
GitHub: https://github.com/sound-infinity
Discord: SoundInfinity#2135
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post