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 


Address List Record Extra (Add a lot of function popup menu)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
YoucefHam
Cheater
Reputation: 5

Joined: 19 Mar 2015
Posts: 39
Location: Algeria

PostPosted: Sun Jun 25, 2023 9:40 pm    Post subject: Address List Record Extra (Add a lot of function popup menu) This post has 1 review(s) Reply with quote

Address List Record Extra

Hello there 👋, I am not good with naming things Rolling Eyes.

Add to Address List Popup Menu:
    "Create Structure Data", Dissect Data/Structure at the selected Address (more than one, add multiple groups)
    "Convert Records to Pointer", Convert Records to Pointer (Format "2:30,0x50" 2 offsets, 1=30 dec, 2=0x50 hex) (more than one record)
    "Copy Address String", => [chrome.exe+28E6E8]
    "COPY CURRENT ADDRESS", Value of [chrome.exe+28E6E8] => 7FFD2F3D7B80
    "COPY ADDRESS Name", Name of [chrome.exe+28E6E8] => KERNEL32.GetSystemTimeAsFileTime
    "Create Header Spacer", Add Header to the selected record with "------------"
    "Create AutoAssemble Script", Add Script to the selected record, [Hold CTRL to Input Name]
    "Disable Without Executing", Disable selected Scripts Without Executing the Disable section. (More than one script)









Download:
Note: Put the file "AddressList Record Extra.lua" in "autorun" folder, located in "C:\Program Files\Cheat Engine 7.x\"



AddressList Record Extra.lua
 Description:

Download
 Filename:  AddressList Record Extra.lua
 Filesize:  10.36 KB
 Downloaded:  13824 Time(s)

Back to top
View user's profile Send private message Send e-mail
Y.A.K.E
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2019
Posts: 56

PostPosted: Wed Oct 11, 2023 1:51 pm    Post subject: Reply with quote

very good
Back to top
View user's profile Send private message
asdasd123
How do I cheat?
Reputation: 0

Joined: 07 Mar 2025
Posts: 6

PostPosted: Fri Jul 11, 2025 6:25 am    Post subject: BUG Reply with quote

错误:... Files\Cheat Engine\autorun\AddressList Record Extra.lua:51: attempt to index a nil value (field 'Address')
stack traceback:
... Files\Cheat Engine\autorun\AddressList Record Extra.lua:51: in function <... Files\Cheat Engine\autorun\AddressList Record Extra.lua:47>


copy address string

CE 7.6
Back to top
View user's profile Send private message
Zephyrusiac
Newbie cheater
Reputation: 1

Joined: 05 Feb 2015
Posts: 17

PostPosted: Wed Mar 11, 2026 12:21 pm    Post subject: Re: BUG Reply with quote

asdasd123 wrote:
错误:... Files\Cheat Engine\autorun\AddressList Record Extra.lua:51: attempt to index a nil value (field 'Address')
stack traceback:
... Files\Cheat Engine\autorun\AddressList Record Extra.lua:51: in function <... Files\Cheat Engine\autorun\AddressList Record Extra.lua:47>


copy address string

CE 7.6


I get the same error, but it is still copied to the clipboard regardless, atleast on my end.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1556

PostPosted: Wed Mar 11, 2026 1:49 pm    Post subject: Reply with quote

Hello everyone,

I've noticed that some users are experiencing a crash (null value error) on line 55 when the script starts up, even when no action or selected address is enabled.

I've optimized the code to include proper null value checks and improved the OnPopup logic. This ensures the script runs flawlessly and smoothly even when no records are selected.
-------------------------------------------------------------------

Delete the relevant function (under the line -- Copy Address String..) and replace it with the following.

-- This function parses the address string and its associated offsets for a memory record.
-- Added a safety check to prevent errors when no address is selected in the list.
Code:
-- Copy Address String
local function getAddressWithChildrenOffsets(memrec)
    -- If no memory record is passed, try to get the currently selected one
    local memrec = memrec or AddressList.SelectedRecord
   
    -- Safety Check: If no record is selected, exit the function immediately
    -- to prevent accessing nil properties (which causes the crash).
    if not memrec then return end

    local mrAddress
    local ParentAddress = memrec
   
    -- Check if the address uses pointer arithmetic (diff pointer)
    if memrec.Address:find('^[+-]') then
        -- Get the base address with offsets
        mrAddress = getAddressWithOffsets(memrec)
       
        -- Check if the record has a parent (part of a complex pointer chain)
        if memrec.Parent then
            ParentAddress = memrec.Parent
            while ParentAddress.Address:match('^[+-]') do
                mrAddress = SetAddress(getAddressWithOffsets(ParentAddress), mrAddress)
                if ParentAddress.Parent then
                    ParentAddress = ParentAddress.Parent
                else
                    break
                end
            end
            mrAddress = SetAddress(getAddressWithOffsets(ParentAddress), mrAddress)
        end
        writeToClipboard(string.format(mrAddress))
        return mrAddress
    end
   
    -- Fallback for standard addresses
    writeToClipboard(string.format(getAddressWithOffsets(memrec)))
    return string.format(getAddressWithOffsets(memrec))
end


----------------------------------

Also, update the header of this function:

(Extra performance..)

Code:
-- Get Old Menu to Add new Menus
local oldOnPopup = AddressList.PopupMenu.OnPopup
AddressList.PopupMenu.OnPopup = function(...)
    if oldOnPopup then
        oldOnPopup(...)
    end

    -- Always keep static menu items visible
    miMemrecExtra4.Visible = true
    miMemrecExtra5.Visible = true
    miMemrecExtra3.Visible = true

    -- Default: Hide special items until we confirm a valid selection
    local visible = false
   
    -- Check if there is at least one valid, non-script record selected
    if AddressList.SelCount > 0 then
        for i = 0, AddressList.Count - 1 do
            local mr = AddressList[i]
            if mr.Selected and
               mr.CurrentAddress ~= nil and
               mr.CurrentAddress ~= 0 and
               mr.Type ~= vtAutoAssembler then
                visible = true
                break
            end
        end
    end

    -- Handle Single-Record-Only items
    local isSingle = (AddressList.SelCount == 1)
   
    -- Copy Address String
    miMemrecExtra1.Visible = (visible and isSingle)
    if miMemrecExtra1.Visible then
        local addr = getAddressWithChildrenOffsets()
        if addr then
            miMemrecExtra1.Caption = string.format('Copy Address String: %s', addr)
        end
    end

    -- Copy Current Address
    miMemrecExtra2.Visible = (visible and isSingle)
    if miMemrecExtra2.Visible then
        miMemrecExtra2.Caption = string.format('Copy Current Address: %X', AddressList.SelectedRecord.CurrentAddress)
    end

    -- Copy Address Name
    miMemrecExtra7.Visible = (visible and isSingle)
    if miMemrecExtra7.Visible then
        miMemrecExtra7.Caption = string.format('Copy Address Name: %s', getNameFromAddress(AddressList.SelectedRecord.CurrentAddress))
    end

    -- Structure and Pointer Tools
    miMemrecExtra8.Visible = visible
    miMemrecExtra9.Visible = visible

    -- "Disable Without Executing" logic (specifically for scripts)
    local scriptVisible = false
    for i = 0, AddressList.Count - 1 do
        if AddressList[i].Selected and AddressList[i].Type == vtAutoAssembler then
            scriptVisible = true
            break
        end
    end
    miMemrecExtra6.Visible = scriptVisible
end

---------------------------------------------------------------------
Note:

If the author hasn't updated the main module yet and you're not proficient enough to edit the code yourself, feel free to let me know in the comments!

I will provide the complete updated version of the module.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
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 Visit poster's website MSN Messenger
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