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 


Show Decimal Ids In Process List (Process Id, Window Handle)

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

Joined: 25 Jan 2006
Posts: 7544
Location: 127.0.0.1

PostPosted: Tue Aug 07, 2018 8:30 pm    Post subject: Show Decimal Ids In Process List (Process Id, Window Handle) This post has 1 review(s) Reply with quote

Here is a very simple autorun script to do this. Open Cheat Engine's install folder, open the autorun folder, create a new file called:
processlistmod.lua

Paste and save this into the script:
Code:

--[[
Process List With Decimal Id (processlistmod.lua)
(c) 2018 atom0s [[email protected]]

A simple autorun script for Cheat Engine 6.8.1 which will alter the process
name list to also include the decimal format of the process id in the names.

Works with 'Applications', 'Processes' and 'Windows' lists to show the decimal
form of each lists entries.
]]--

processListTimer = processListTimer or createTimer();
processListTimer.Interval = 500;
processListTimer.OnTimer = function(t)
    -- Loop and find the process window..
    local fcount = getFormCount();
    for x = 0, fcount - 1 do
        local wnd = getForm(x);
        if (wnd ~= nil and string.lower(wnd.getName()) == 'processwindow') then
            -- Find the process list control..
            local lst = wnd.findComponentByName('ProcessList');
            if (lst ~= nil) then
                -- Loop and update the names..
                local names = lst.getItems();
                for y = 0, names.getCount() - 1 do
                    -- Check if the process name has been edited already..
                    -- This will use the known process id in decimal to validate since window titles can have similar text..
                    local pid, name = string.match(names[y], '([A-Fa-f0-9]+)-(.+)');
                    local dec = tonumber(pid, 16);
                    if (string.find(name, '%(' .. tostring(dec) .. '%)') == nil) then
                        names[y] = string.format('%s-(%d)-%s', pid, dec, name);
                    end
                end
            end

            -- Finish here since we found the window already..
            return;
        end
    end
end
processListTimer.setEnabled(true);


Restart cheat engine if it's already open, now when the process list window is open, you'll see results like this:


The hex version of the name must be at the front due to how CE opens processes. The name of the process wont show in CE's main window title any longer either due to this mod.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Aylin
Expert Cheater
Reputation: 2

Joined: 16 Feb 2017
Posts: 194

PostPosted: Sat Dec 08, 2018 8:14 am    Post subject: Reply with quote

Thanks.
This saved me from some trouble.
I'm not going to account for 4Bytes anymore. Smile

and a request;
Instead of "Chrome.exe" or "Mozilla.exe" for browsers,
Is it possible to have a script that shows the names of the page "URL"?
Like "Chrome.exe (Face.com) or" Mozilla.exe (King.io)! Rolling Eyes
I am counting the above script as the starting base.
Hopefully we will develop and approve the processes with Pages, Tab names.
Thanks again. Smile

_________________
See Hitler ! This Trainer is for you!
http://forum.cheatengine.org/viewtopic.php?t=606786
Enthusiastic people: Always one step ahead!
Do not underestimate me Master: You were a beginner in the past!
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 360

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

PostPosted: Sat Dec 08, 2018 10:05 am    Post subject: Reply with quote

might be easier to write a browser plugin that feeds tgat data to ce
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
Aylin
Expert Cheater
Reputation: 2

Joined: 16 Feb 2017
Posts: 194

PostPosted: Mon Dec 10, 2018 1:24 pm    Post subject: Reply with quote

It might be a day.
but now, complex codes for me. Wink
OK I agree; This is the subject of the online game procedure.
But the potential is great! Smile
@atom0s has given a start code and hopefully open to suggestions.
DB; the process you say, the masters can.
I am hopeful! Rolling Eyes

_________________
See Hitler ! This Trainer is for you!
http://forum.cheatengine.org/viewtopic.php?t=606786
Enthusiastic people: Always one step ahead!
Do not underestimate me Master: You were a beginner in the past!
Back to top
View user's profile Send private message MSN Messenger
Aylin
Expert Cheater
Reputation: 2

Joined: 16 Feb 2017
Posts: 194

PostPosted: Sun Dec 16, 2018 4:50 pm    Post subject: Reply with quote

The codes don't belong to me!
But I blended it into the above idea.
Menu insert encoding can be complex,
(Main Menu code: @Corroder "Rainbow Script")
It is still used in the "Autorun" folder!
In addition, the "Process Label" for the destination directory assistance;
Thanks @freeER
The following encoding:
FlashPlayer in the automatic process, one-click finds!
But I'm still investigating the URL (.com, .iro, .etc). Smile
Thanks CEF



Code:
--======================================--
local mainForm = getMainForm()
local flashMenu = createMenuItem(mainForm)
flashMenu.Caption = [[AutoFlash]]

flashMenu.onClick = flashMenuClick
mainForm.PopupMenu2.Items.insert(15,flashMenu)
local mainMenu = mainForm.Menu.Items
local miFlash = createMenuItem(mainForm)
   miFlash.Caption = 'AutoFlash'
   mainMenu.insert(mainMenu.Count-2,miFlash)
   miFlash.onClick = miFlashClick
--======================================--
--================== GLOBAL BROWSER ==================--
function pidDialog(doPid,autoSelectFirst,pn,dn)
  autoSelectFirst = autoSelectFirst or false
  local plugname = type(pn)=='table' and pn or {"iexplore","flashplayerplugin","plugin-container","opera","chrome","awesomium_process","torch","dragon","maxthon","palemoon","safari" }
  local dllname  = type(dn)=='table' and dn or {"flash","unity" }
  if type(pn)=='string' then table.insert(plugname,pn) end
  if type(dn)=='string' then table.insert(dllname,dn) end
  local indexOf = function(s,m) for i=1,#m do if string.find(string.lower(s),string.lower(m[i]),1,true) then return i end end end -- cave insensitive find
  local function tmerge(t,o,...) for k,v in pairs(o) do t[k]=v end if select('#',...)>0 then return tmerge(t,...) else return t end end
  local function callLater(f,...)
    local a,n = {...},select('#',...)
    local t = tmerge(createTimer(),{Interval=1,Enabled=true,OnTimer=function(sender) sender.Enabled=false sender.Destroy() f(unpack(a,1,n)) end})
    return t
  end
  local function parseProc(i,s)
    local dll=' ... '
    for pid,name in string.gmatch(s,'([0-9A-F]+)-(.*)') do
      local weight,pid = 0,tonumber(pid,16)
      for _,v in ipairs(plugname) do
        if indexOf(name,plugname) then
          weight = weight + 1
          local m = enumModules(pid)
          for i=1,#m do
            local ix = indexOf(m[i].Name,dllname)
            if ix then
              weight = weight + 1
              dll = dllname[ix]
              break
            end
          end
          break
        end
      end
      return {pid=pid,desc=string.format('%5d %04X <%5s> %s',pid,pid,string.sub(dll.."     ",1,5):upper(),name),name=name,w=weight+i/2048,dll=dll}
    end
  end

  local FP = createForm(false)
  tmerge(FP,{FormStyle='fsStayOnTop',AutoSize=true,BorderWidth=4,Color=0x00ffff,Position='poScreenCenter',BorderStyle='bsToolWindow',Caption='Double Click to Select - Seçimi Çift Tıklayın!'})
  local LB = createListBox(FP)
  tmerge(LB,{MultiSelect=false,AutoSize=true,Color=0xfff00f})
  local cs = LB.Constraints
  tmerge(cs,{MinHeight=80,MinWidth=280})
  local fn = LB.Font
  tmerge(fn,{Color=0x030303,Name='Courier New',Height=-12,Style='[bsBold]'})

  LB.OnDblClick = function()
    local idx,PID,NAME = LB.ItemIndex,nil,''
    if idx >= 0 then
      DESC = LB.Items[idx]
      for pid,pID,name in string.gmatch(DESC,"([0-9]+) ([0-9A-F]+) <.-> (.*)") do

        PID = tonumber(pid,10)
        NAME = name
      end
    end

    if PID ~= nil then callLater(doPid,PID,NAME,DESC) end
    FP.close()
  end -- LB.OnDblClick

  FP.OnClose = function()  FP.destroy(); FP = nil end

  getProcesslist(LB.Items)
  local plist = {}
  for i=1,LB.Items.getCount() do
    table.insert(plist,parseProc(i,LB.Items[i-1]))
  end

  table.sort(plist,function(a,b) return a.w > b.w end)
  local currProcId = getOpenedProcessID()
  for i=1,LB.Items.getCount() do
    LB.Items.setString(i-1,plist[i].desc)
    if plist[i].pid == currProcId then LB.setItemIndex(i-1) end
    if i==1 and autoSelectFirst == true or type(autoSelectFirst)=='string' and indexOf(plist[i].dll,{autoSelectFirst}) ~=nil then
      LB.setItemIndex(i-1) LB.OnDblClick() return
    end
  end

  FP.show()
end

    for i=0,MainForm.ComponentCount-1 do
local c = MainForm.Component[i]
end
miFlash.onClick=function(sender)
pidDialog(function(pid,name)
           openProcess(pid)
--===== Thanks freeER ====--
MainForm.ProcessLabel.caption = (string.format('(%s %04X) %s %s',"PID:",pid,name,'ON!'))
     end,'flash')
end

_________________
See Hitler ! This Trainer is for you!
http://forum.cheatengine.org/viewtopic.php?t=606786
Enthusiastic people: Always one step ahead!
Do not underestimate me Master: You were a beginner in the past!
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting -> Lua 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