Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Dublicate process and dynamic name

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
pekeltje
How do I cheat?
Reputation: 0

Joined: 04 Jun 2014
Posts: 1

PostPosted: Wed Jun 04, 2014 4:11 am    Post subject: Dublicate process and dynamic name Reply with quote

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")

And select the one with highest memory usage.

Im new to this.

Pekeltje
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Wed Jun 04, 2014 12:18 pm    Post subject: Reply with quote

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.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Thu Jun 05, 2014 7:17 am    Post subject: Reply with quote

Atom0s, it does not return physical memory.
That's why tasklist could be better.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites