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 


remove addresses that are not accessed in the search results

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
etioplmld
Advanced Cheater
Reputation: 0

Joined: 09 Feb 2021
Posts: 74

PostPosted: Thu May 25, 2023 3:01 am    Post subject: remove addresses that are not accessed in the search results Reply with quote

This code does not check the last one adress
Code:

f = createForm(true)
f.Position=poDesktopCenter
f.Width=500
f.Height=220
f.Caption = 'checkForAccess'

local lb = createLabel(f)
lb.Left=44
lb.Top=30
lb.caption='adress'
lb.Color = 16777215
local font=lb.Font
font.Size = 22
font.Color = 0xff0000

debugProcess()
local fl = getMainForm().Foundlist3
ckAccess = {}

function setbp(i)

if i>=2 then
  if ckAccess[i-2] == 0 then
       fl.Items[i-2].Selected = true
    end
debug_removeBreakpoint(fl.Items[i-2].Caption)
end

if i<=fl.Items.Count then
ckAccess[i-1] = 0
debug_setBreakpoint(fl.Items[i-1].Caption, 1, bptAccess, function() ckAccess[i-1] = 1 end)
end
end

for i=1,fl.Items.Count do
  createTimer(1000*i,function() lb.caption=fl.Items[i-1].Caption;setbp(i) end )
end


this code jump the fist one adress


Code:

f = createForm(true)
f.Position=poDesktopCenter
f.Width=500
f.Height=220
f.Caption = 'checkForAccess'

local lb = createLabel(f)
lb.Left=44
lb.Top=30
lb.caption='adress'
lb.Color = 16777215
local font=lb.Font
font.Size = 22
font.Color = 0xff0000

debugProcess()
local fl = getMainForm().Foundlist3
ckAccess = {}

function setbp(i)
if i>=1 then   -- check previous bp
if i<= fl.Items.Count then
 if ckAccess[i-1] == 0 then
       fl.Items[i-1].Selected = true
       debug_removeBreakpoint(fl.Items[i-1].Caption)

     end
   end
end

if i< fl.Items.Count then  -- set bp
 ckAccess[i] =0
debug_setBreakpoint(fl.Items[i].Caption, 1, bptAccess, function() ckAccess[i] = 1 end)
end
end

for i=0,fl.Items.Count do
  createTimer(1000*i,function() lb.caption=fl.Items[i-1].Caption;setbp(i) end )
end

-----
Anyway, when you search for pointers, you can use this code to remove addresses that are not accessed in the search results.The address has been selected, just right-click to delete it.

After multiple attempts to confirm, due to some mysterious reason, using the timer in this way will fail .
Code:

local cctimer = createTimer()
cctimer.Interval = 1000
i = 0
function countdown()
i=i + 1
print(i)
if i>= 5 then
object_destroy(cctimer)
end
end
cctimer.OnTimer = countdown

Code:

function countdown()
  local i = 0
  local t = createTimer()
  t.Interval = 1000
  t.OnTimer = function()
  i = i + 1
  print(i)
if i>=5 then
  t.Destroy()
  end
end
end
countdown()
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