Jump to content
  • 0

searchNumber or searchAddress


ProgWeb

Question

Posted

How to use Lua to search 200 values near address is similar to the following figure?

Are there any examples?


image.thumb.png.607d231a019fdab4ba513aca573b7a4a.png

2 answers to this question

Recommended Posts

Posted

"memoryFrom" and "memoryTo" parameters of searchNumber API function can be used to set search bounds. To perform nearby search just set "memoryFrom" parameter to address - distance and "memoryTo" parameter to address + distance. Example: 

local address = 0x10001000
local minAddress = address - 200 -- equivalent of "Before" checkbox and distance of 200 (0xC8) bytes
local maxAddress = address + 400 -- equivalent of "After" checkbox and distance of 400 (0x190) bytes
-- Search for any value of type "Byte" in range of addresses from 0x10000F38 to 0x10001190
gg.searchNumber("0~~0", gg.TYPE_BYTE, false, gg.SIGN_EQUAL, minAddress, maxAddress)
Posted
On 7/8/2022 at 5:24 AM, CmP said:

"memoryFrom" and "memoryTo" parameters of searchNumber API function can be used to set search bounds. To perform nearby search just set "memoryFrom" parameter to address - distance and "memoryTo" parameter to address + distance. Example: 

local address = 0x10001000
local minAddress = address - 200 -- equivalent of "Before" checkbox and distance of 200 (0xC8) bytes
local maxAddress = address + 400 -- equivalent of "After" checkbox and distance of 400 (0x190) bytes
-- Search for any value of type "Byte" in range of addresses from 0x10000F38 to 0x10001190
gg.searchNumber("0~~0", gg.TYPE_BYTE, false, gg.SIGN_EQUAL, minAddress, maxAddress)

thank you very much for your help!i used getValues to for200 the address before,But getNumber is obviously better,this will save more code😋

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.