Posted: Wed Jun 04, 2014 4:11 am Post subject: Dublicate process and dynamic name
Hello,
I want to cheat on a online flash game.
The problem is that there are 2 processes with the same name, and the process has a version number in it that might change.
Its called: FlashPlayerPlugin_13_0_0_214
Is there a way to use something like:
openProcess("FlashPlayerPlugin*.exe")
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
Posted: Wed Jun 04, 2014 12:18 pm Post subject:
You can use 'getProcesslist' to obtain a list of all running processes in a list of strings.
Here's an example of getting a partial match:
Code:
function getProcessByPartialName(name)
local procNames = createStringlist();
getProcessList(procNames);
for x = 0, procNames:getCount() - 1 do
local procInfo = { procNames[x]:match('([%a%d]+)-(.*)') };
if (procInfo[2]:lower():find(name:lower(), nil, true) ~= nil) then
return procInfo[1], procInfo[2];
end
end
return nil;
end
Returns two values, the first is the process id, the second is the name.
If no process is found with the matching part, it will return nil. _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum