Categories > Coding > C# >
hey alexa! whats the best way to make auto attach
Posted
alexa read the title and spoon feed my cuz im baby
Replied
not the best but it works
try
{
Process[] processes = Process.GetProcessesByName("RobloxPlayerBeta");
if (processes.Length > 0)
{
Console.WriteLine("You can inject (roblox is open )");
}
else
{
Console.WriteLine("you cant inject ( roblox is closed) ");
}
}
catch (Exception ex)
{
Console.WriteLine("An error occurred while trying to check for Roblox: " + ex.Message);
}
}
Cancel
Post
Added
@atariXD, that is true but its important for handling errors and preventing crashes
and if you really dont want error handling you could just remove it
rocess[] processes = Process.GetProcessesByName("RobloxPlayerBeta");
if (processes.Length > 0)
{
Console.WriteLine("Roblox is running.");
}
else
{
Console.WriteLine("Roblox is not running.");
}
this would work aswell
Process[] processes = Process.GetProcessesByName("RobloxPlayerBeta");
if (processes == null || processes.Length == 0)
{
Console.WriteLine("Roblox is not running.");
}
else
{
Console.WriteLine("Roblox is running.");
}
}
Cancel
Post
https://media.discordapp.net/attachments/979069297374671018/1078367228593971362/VelvetSiggy.png
Replied
@Haruka, Roblox has 2 processes though and you cant inject if there is only 1 procces? so just checking if it is greater then 0 could cause problems I think?
Cancel
Post
nltr | Wpf/C# & Cpp Developer | Former Fluxus Administrator------------------------------------------------------------------------------------💜 Developer of Kronos 💜
Replied
use a timer or a while true loop to check if the roblox process is running and then inject
Cancel
Post
Replied
@intristic_roast,
what i will do is sort by the roblox proccesses which takes the mostest memory
Cancel
Post
Replied
@reversed_coffee, I don't know why youre acting like such a smart ass when in reality you said a whole bunch of nonsense,
anyway as for the advice you gave, you don't have to check for debugger thats stupid and inefficient and everything about that doesn't make sense why would you do that
I also don't see how making a new thread (which is stupid either way) would block any sort of task like updating, the whole point of multi-threading
s asynchrounity, apart from that use tasks not new Thread because that makes a new system thread which is inefficient,
as for "spoonfeeding" this is the most annoying anwser you can possibly give, not only because everything you said was pretty much incorrect, but also as for an actual decent solution here:
Cancel
Post
Replied
Make a loop that will:
1. Look for a Roblox process.
2. If found, inject the API into the process.
3. (Optional) Return a message saying injection complete.
Cancel
Post
Random quote here...
Replied
@reversed_coffee,
There's nothing "questionable" in the reply Iskra left to you.
You posted something stupid and we're corrected for it, there's no need to leave any aftershock.
"I get that we all slip up, and even I do" who are you again????
There is no more explanation needed in the code he provided, either. It's self documenting and very easy for anyone to understand.
You're in need of a reality check. If you don't know the answer, don't post it.
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post