Process Killer

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
User avatar
corroder
Novice Cheater
Novice Cheater
Posts: 17
Joined: Fri Mar 03, 2017 1:54 am
Reputation: 1

Process Killer

Post by corroder »

Hi there,
This script is to get and attach process to CE.

Code: Select all

--- Process Handler
function GetTheProcessList()
 local T = {}
 local SL=createStringlist()
 getProcesslist(SL)
 for i=0,strings_getCount(SL)-1 do
  T[i] = strings_getString(SL,i)
 end
 return T
end

function GetPros(sender)
 local PL = GetTheProcessList()
 local S = {}
 local variable = drop.text
 list.Clear()
 for x = 0, #PL do
  if variable == "All" then
  list.Items.Add(PL[x])
  else
  if string.sub(PL[x],10) == variable then
  --S[#S+1] = PL[x]  --list for reference
  list.Items.Add(PL[x])
  end
  end
 end
end

function OpenPro()
 local a = list.ItemIndex
 if a ~= -1 then
 local b = string.sub(list.Items[a],0,8)
 b = tonumber(b,16)
 openProcess(b)
 else
 showMessage("Process not found...")
 return
 end
end
Now I try to make function process killer..

Code: Select all

function KillPro()
 local a = list.ItemIndex
 if a ~= -1 then
 local b = string.sub(list.Items[a],0,8)
 b = tonumber(b,16)
 shellExecute(string.format(b), '/c taskkill /PID ' .. getOpenedProcessID(), nil, false)
 else
 showMessage("Process not found...")
 return
 end
end
Is function KillPro() correct or is there any other way to kill a ran process ?

Thanks

Post Reply

Who is online

Users browsing this forum: Dread_Pony_Roberts