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 


Process Monitor (Auto-Terminate CE)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
atom0s
Moderator
Reputation: 152

Joined: 25 Jan 2006
Posts: 7827
Location: 127.0.0.1

PostPosted: Sun Dec 01, 2019 2:26 pm    Post subject: Process Monitor (Auto-Terminate CE) Reply with quote

This was requested the other day, so figured would toss together a quick and simple example of doing this.

This script will automatically terminate CE if a matching process is found running on the system.

You can edit the list by altering the 'procMonNames' table entries'.
Currently scans once per second, but that can be edited via the 'Interval' value.

Code:

--[[
Process Monitor [procmon.lua]
(c) 2019 atom0s

Simple script to monitor the running process list for certain executable names. If a match is found,
CE will terminate.

Edit the 'procMonNames' to add new processes to monitor.
Edit the 'Interval' to adjust how often this scans. (Currently once per second.)
]]--

-- The list of processes to look for and terminate if found..
local procMonNames = { 'notepad.exe', 'regedit.exe' };

-- Determines if the given process name exists in the procMonNames table..
local function hasName(n)
    n = string.lower(n);
    for k, v in ipairs(procMonNames) do
        if (n == v) then
            return true;
        end
    end
    return false;
end

-- Start a background timer to monitor the process list..
local procMonTimer = procMonTimer or createTimer();
procMonTimer.Interval = 1000;
procMonTimer.OnTimer = function(t)
    -- Obtain the current process list..
    local procs = getProcesslist();

    -- Check for bad processes to kill CE..
    for k, v in pairs(procs) do
        if (hasName(v)) then
            closeCE();
        end
    end
end
procMonTimer.setEnabled(true);


Save as procmon.lua inside of your CE autorun folder.

_________________
- Retired.
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 Extensions 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