簡體   English   中英

使用LUA獲取Cheat Engine中字符串搜索的結果數

[英]Get number of results for a string search in Cheat Engine using LUA

我有包含搜索字符串的.txt文件,每個字符串都用一個新行分隔。 我想編寫一個LUA腳本,從.txt文件一次讀取一行。

對於讀取的每一行,應在Cheat Engine(在我的例子中為BlueStacks)中打開的進程上執行String內存掃描。

然后應將該掃描的結果數打印到控制台。 這應該重復對.txt文件中每個搜索字符串的新掃描,直到到達結尾。

我非常感謝對此事的任何幫助。 非常感謝!

我的問題在Cheat Engine論壇上由Dark Byte回答。 如果有人對解決方案感興趣,這里是:

s=createStringlist()
s.LoadFromFile([[d:\bla.txt]])
local protectionflags='' --change this to the kind you need. empty string is everything *X*C*W
local casesensitive=true

local ms=createMemScan()
local fl=createFoundList(ms)

local i
for i=0,s.count-1 do
  ms.firstScan(soExactValue, vtString,nil,s[i],'',0,0x7fffffffffffffff,protectionflags,fsmNotAligned,'1',false,true,false,casesensitive)
  ms.waitTillDone()

  fl.initialize()
  print(s[i]..'='..fl.count)
  fl.deinitialize()
end

fl.destroy()
ms.destroy()
s.destroy()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM