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 list?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
ethnic
Newbie cheater
Reputation: 0

Joined: 13 Jun 2013
Posts: 13

PostPosted: Sun Jun 23, 2013 10:10 am    Post subject: Process list? Reply with quote

Hey,
I want to make a procces list in my trainer where i can change the process where the trainer injected.

How i can make this?

Sorry for bad english :/
Im German Razz
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Sun Jun 23, 2013 1:29 pm    Post subject: Reply with quote

If you want to get all processes you can use this example (C.E 6.2, I'm still using it, got used to it more).
Code:

f = createForm()
control_setSize(f, 400,400)
control_setCaption(f, "Process List")
setProperty(f , "BiDiMode", "bdLeftToRight")

list = createListBox(f)
x,y = control_getSize(f)
control_setSize(list, x-10, y-10)
control_setPosition(list, 5,5)

Items = listbox_getItems(list)

TempTable = {}
function GetTheProcessList()
   local SL=createStringlist()
   getProcesslist(SL)
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
     TempTable[i] = {PID, processname}
  end
  return TempTable
end

function AddTheProcessList()
   GetTheProcessList()
   index = 0
   for y in pairs (TempTable) do
      index = index+1
   end
   for i=0, index-1 do
      if TempTable[i]~='' and TempTable[i]~= nil then
         TempText = "Process ID : "..TempTable[i][1].."   Process Name : "..TempTable[i][2]
         strings_add(Items, TempText)
      end
   end
end
AddTheProcessList()


Edit:
Here's a fully working ones...
Ofcourse you can put more effort into it and customize it much more.
Code:

f = createForm()
control_setSize(f, 400,400)
control_setCaption(f, "Process List")
setProperty(f , "BiDiMode", "bdLeftToRight")

list = createListBox(f)
x,y = control_getSize(f)
control_setSize(list, x-10, y-30)
control_setPosition(list, 5,5)

button1 = createButton(f)
button2 = createButton(f)
button3 = createButton(f)
control_setSize(button1, 80, 20)
control_setSize(button2, 80, 20)
control_setSize(button3, 80, 20)
control_setCaption(button1, "Get Processes")
control_setCaption(button2, "Clear")
control_setCaption(button3, "Attach")

control_setPosition(button1, 50,y-22)
control_setPosition(button2, 150,y-22)
control_setPosition(button3, 250,y-22)

Items = listbox_getItems(list)

TempTable = {}
function GetTheProcessList()
   local SL=createStringlist()
   getProcesslist(SL)
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
     TempTable[i] = {PID, processname}
  end
  return TempTable
end

function AddTheProcessList()
   GetTheProcessList()
   index = 0
   for y in pairs (TempTable) do
      index = index+1
   end
   for i=0, index-1 do
      if TempTable[i]~='' and TempTable[i]~= nil then
         local TempText = "Process ID : "..TempTable[i][1].."   Process Name : "..TempTable[i][2]
         strings_add(Items, TempText)
      end
   end
end
function GetAndAddProcess()
   TempTable = {}
   strings_clear(Items)
   AddTheProcessList()
end

function Clear()
   TempTable = {}
   strings_clear(Items)
end

function AttachToTheSelectedProcess()
   local ProcessID = listbox_getItemIndex(list)
   if ProcessID~=-1 then
      if TempTable[ProcessID][1]~=nil then
         openProcess(TempTable[ProcessID][1])
      else
         return showMessage("Failed to open the select process")
      end
   else
      return showMessage("Please choose a process from the list")
   end
end

control_onClick(button1,GetAndAddProcess)
control_onClick(button2,Clear)
control_onClick(button3,AttachToTheSelectedProcess)

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
ethnic
Newbie cheater
Reputation: 0

Joined: 13 Jun 2013
Posts: 13

PostPosted: Sun Jun 23, 2013 1:46 pm    Post subject: Reply with quote

Thanks Smile
Back to top
View user's profile Send private message
mausi125
Advanced Cheater
Reputation: 1

Joined: 05 Jun 2014
Posts: 86

PostPosted: Sun Oct 19, 2014 4:30 pm    Post subject: Reply with quote

awesome, big thanks x9999 Wink
Back to top
View user's profile Send private message
ashb
How do I cheat?
Reputation: 0

Joined: 12 Dec 2014
Posts: 2

PostPosted: Fri Dec 12, 2014 4:59 am    Post subject: Reply with quote

Big thanks!

And how to find automaticly Shockwave Flash plugin process in list of many browser processes (like in chrome or opera browsers)? Question
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Fri Dec 12, 2014 7:13 am    Post subject: Reply with quote

Code:
 
enumModules(processid OPTIONAL):
  Returns a table containing information about each module in the current process, or the specified processid
  Each entry is a table with fields
    Name : String containing the modulename    Address: Integer representing the address the module is loaded
    Is64Bit: Boolean set to true if it's a 64-bit module
    PathToFile: String to the location this module is loaded

Call this for every process and see which ones have the flashplayer dll loaded

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
ashb
How do I cheat?
Reputation: 0

Joined: 12 Dec 2014
Posts: 2

PostPosted: Fri Dec 12, 2014 11:40 am    Post subject: Reply with quote

Dark Byte wrote:
Code:
 
enumModules(processid OPTIONAL):
  Returns a table containing information about each module in the current process, or the specified processid
  Each entry is a table with fields
    Name : String containing the modulename    Address: Integer representing the address the module is loaded
    Is64Bit: Boolean set to true if it's a 64-bit module
    PathToFile: String to the location this module is loaded

Call this for every process and see which ones have the flashplayer dll loaded

thanks!
Back to top
View user's profile Send private message
Remember
How do I cheat?
Reputation: 0

Joined: 03 Apr 2015
Posts: 4

PostPosted: Mon May 25, 2015 7:24 pm    Post subject: Reply with quote

is possible show on the list before the browser then everything else

example: flashplayerplugin,chrome,opera,maxthon,firefox,safari etc..
Back to top
View user's profile Send private message
ZxPwds
Advanced Cheater
Reputation: 0

Joined: 27 Oct 2015
Posts: 59

PostPosted: Wed Jun 16, 2021 12:27 pm    Post subject: Reply with quote

DaSpamer wrote:
If you want to get all processes you can use this example (C.E 6.2, I'm still using it, got used to it more).
Code:

f = createForm()
control_setSize(f, 400,400)
control_setCaption(f, "Process List")
setProperty(f , "BiDiMode", "bdLeftToRight")

list = createListBox(f)
x,y = control_getSize(f)
control_setSize(list, x-10, y-10)
control_setPosition(list, 5,5)

Items = listbox_getItems(list)

TempTable = {}
function GetTheProcessList()
   local SL=createStringlist()
   getProcesslist(SL)
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
     TempTable[i] = {PID, processname}
  end
  return TempTable
end

function AddTheProcessList()
   GetTheProcessList()
   index = 0
   for y in pairs (TempTable) do
      index = index+1
   end
   for i=0, index-1 do
      if TempTable[i]~='' and TempTable[i]~= nil then
         TempText = "Process ID : "..TempTable[i][1].."   Process Name : "..TempTable[i][2]
         strings_add(Items, TempText)
      end
   end
end
AddTheProcessList()


Edit:
Here's a fully working ones...
Ofcourse you can put more effort into it and customize it much more.
Code:

f = createForm()
control_setSize(f, 400,400)
control_setCaption(f, "Process List")
setProperty(f , "BiDiMode", "bdLeftToRight")

list = createListBox(f)
x,y = control_getSize(f)
control_setSize(list, x-10, y-30)
control_setPosition(list, 5,5)

button1 = createButton(f)
button2 = createButton(f)
button3 = createButton(f)
control_setSize(button1, 80, 20)
control_setSize(button2, 80, 20)
control_setSize(button3, 80, 20)
control_setCaption(button1, "Get Processes")
control_setCaption(button2, "Clear")
control_setCaption(button3, "Attach")

control_setPosition(button1, 50,y-22)
control_setPosition(button2, 150,y-22)
control_setPosition(button3, 250,y-22)

Items = listbox_getItems(list)

TempTable = {}
function GetTheProcessList()
   local SL=createStringlist()
   getProcesslist(SL)
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
     TempTable[i] = {PID, processname}
  end
  return TempTable
end

function AddTheProcessList()
   GetTheProcessList()
   index = 0
   for y in pairs (TempTable) do
      index = index+1
   end
   for i=0, index-1 do
      if TempTable[i]~='' and TempTable[i]~= nil then
         local TempText = "Process ID : "..TempTable[i][1].."   Process Name : "..TempTable[i][2]
         strings_add(Items, TempText)
      end
   end
end
function GetAndAddProcess()
   TempTable = {}
   strings_clear(Items)
   AddTheProcessList()
end

function Clear()
   TempTable = {}
   strings_clear(Items)
end

function AttachToTheSelectedProcess()
   local ProcessID = listbox_getItemIndex(list)
   if ProcessID~=-1 then
      if TempTable[ProcessID][1]~=nil then
         openProcess(TempTable[ProcessID][1])
      else
         return showMessage("Failed to open the select process")
      end
   else
      return showMessage("Please choose a process from the list")
   end
end

control_onClick(button1,GetAndAddProcess)
control_onClick(button2,Clear)
control_onClick(button3,AttachToTheSelectedProcess)




How would you edit the GUI in the designer on this?
Back to top
View user's profile Send private message
ByTransient
Expert Cheater
Reputation: 5

Joined: 05 Sep 2020
Posts: 240

PostPosted: Thu Jun 17, 2021 7:24 am    Post subject: Reply with quote

ZxPwds wrote:
How would you edit the GUI in the designer on this?



Code:
f = createForm()
control_setSize(f, 400,400)
control_setCaption(f, "Process List")
setProperty(f , "BiDiMode", "bdLeftToRight")

list = createListBox(f)
x,y = control_getSize(f)
control_setSize(list, x-10, y-30)
control_setPosition(list, 5,5)

button1 = createButton(f)
button2 = createButton(f)
button3 = createButton(f)
control_setSize(button1, 80, 20)
control_setSize(button2, 80, 20)
control_setSize(button3, 80, 20)
control_setCaption(button1, "Get Processes")
control_setCaption(button2, "Clear")
control_setCaption(button3, "Attach")

control_setPosition(button1, 50,y-22)
control_setPosition(button2, 150,y-22)
control_setPosition(button3, 250,y-22)


-->>>
You Trainer name (sample): UDF1

Code:
local list = UDF1.CEListBox1
local button1 = UDF1.CEButton1
local button2 = UDF1.CEButton2
local button3 = UDF1.CEButton3

Items = listbox_getItems(list)

TempTable = {}
function GetTheProcessList()
   local SL=createStringlist()
   getProcesslist(SL)
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
     TempTable[i] = {PID, processname}
  end
  return TempTable
end

function AddTheProcessList()
   GetTheProcessList()
   index = 0
   for y in pairs (TempTable) do
      index = index+1
   end
   for i=0, index-1 do
      if TempTable[i]~='' and TempTable[i]~= nil then
         local TempText = "Process ID : "..TempTable[i][1].."   Process Name : "..TempTable[i][2]
         strings_add(Items, TempText)
      end
   end
end
function GetAndAddProcess()
   TempTable = {}
   strings_clear(Items)
   AddTheProcessList()
end

function Clear()
   TempTable = {}
   strings_clear(Items)
end

function AttachToTheSelectedProcess()
   local ProcessID = listbox_getItemIndex(list)
   if ProcessID~=-1 then
      if TempTable[ProcessID][1]~=nil then
         openProcess(TempTable[ProcessID][1])
      else
         return showMessage("Failed to open the select process")
      end
   else
      return showMessage("Please choose a process from the list")
   end
end

control_onClick(button1,GetAndAddProcess)
control_onClick(button2,Clear)
control_onClick(button3,AttachToTheSelectedProcess)


...
Back to top
View user's profile Send private message
ZxPwds
Advanced Cheater
Reputation: 0

Joined: 27 Oct 2015
Posts: 59

PostPosted: Thu Jun 17, 2021 10:11 am    Post subject: Reply with quote

ByTransient wrote:
ZxPwds wrote:
How would you edit the GUI in the designer on this?



Code:
f = createForm()
control_setSize(f, 400,400)
control_setCaption(f, "Process List")
setProperty(f , "BiDiMode", "bdLeftToRight")

list = createListBox(f)
x,y = control_getSize(f)
control_setSize(list, x-10, y-30)
control_setPosition(list, 5,5)

button1 = createButton(f)
button2 = createButton(f)
button3 = createButton(f)
control_setSize(button1, 80, 20)
control_setSize(button2, 80, 20)
control_setSize(button3, 80, 20)
control_setCaption(button1, "Get Processes")
control_setCaption(button2, "Clear")
control_setCaption(button3, "Attach")

control_setPosition(button1, 50,y-22)
control_setPosition(button2, 150,y-22)
control_setPosition(button3, 250,y-22)


-->>>
You Trainer name (sample): UDF1

Code:
local list = UDF1.CEListBox1
local button1 = UDF1.CEButton1
local button2 = UDF1.CEButton2
local button3 = UDF1.CEButton3

Items = listbox_getItems(list)

TempTable = {}
function GetTheProcessList()
   local SL=createStringlist()
   getProcesslist(SL)
   for i=0,strings_getCount(SL)-1 do
      local entry = strings_getString(SL,i)
      local processname = entry:sub(10,255)
      local PID = tonumber('0x'..entry:sub(1,8))
     TempTable[i] = {PID, processname}
  end
  return TempTable
end

function AddTheProcessList()
   GetTheProcessList()
   index = 0
   for y in pairs (TempTable) do
      index = index+1
   end
   for i=0, index-1 do
      if TempTable[i]~='' and TempTable[i]~= nil then
         local TempText = "Process ID : "..TempTable[i][1].."   Process Name : "..TempTable[i][2]
         strings_add(Items, TempText)
      end
   end
end
function GetAndAddProcess()
   TempTable = {}
   strings_clear(Items)
   AddTheProcessList()
end

function Clear()
   TempTable = {}
   strings_clear(Items)
end

function AttachToTheSelectedProcess()
   local ProcessID = listbox_getItemIndex(list)
   if ProcessID~=-1 then
      if TempTable[ProcessID][1]~=nil then
         openProcess(TempTable[ProcessID][1])
      else
         return showMessage("Failed to open the select process")
      end
   else
      return showMessage("Please choose a process from the list")
   end
end

control_onClick(button1,GetAndAddProcess)
control_onClick(button2,Clear)
control_onClick(button3,AttachToTheSelectedProcess)


...



doesnt work or i dont understand, just nevermind i guess, thanks.
Back to top
View user's profile Send private message
ByTransient
Expert Cheater
Reputation: 5

Joined: 05 Sep 2020
Posts: 240

PostPosted: Thu Jun 17, 2021 12:40 pm    Post subject: Reply with quote

Here is an example usage :

https://www.dosyaupload.com/8eq1



Ek1.PNG
 Description:
 Filesize:  288.38 KB
 Viewed:  2350 Time(s)

Ek1.PNG


Back to top
View user's profile Send private message
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