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 


[Help]Scanning for strings in intervals

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
liinko
How do I cheat?
Reputation: 0

Joined: 29 Dec 2014
Posts: 1

PostPosted: Mon Dec 29, 2014 12:48 am    Post subject: [Help]Scanning for strings in intervals Reply with quote

So the game I'm playing creates the filepath and filename for their internal files as they are loaded in the game itself. I can get these names in memory viewer > view > all strings, and then write them to a file with a simple lua script. The problem is I have to constantly generate a new string map every time the game loads new files as I move around the zones, write them to a file again and remove the duplicates.

This is what I'm using now
Code:
c=getFormCount()
result=""
file = io.open("Names.txt", "w")
for i=0, c-1 do
  f=getForm(i)
  if object_getClassName(f)=="TfrmStringMap" then
    c2=component_getComponentCount(f)
    for j=0, c2-1 do
      o=component_getComponent(f,j);
      if component_getName(o)=="ListView1" then
        lvi=listview_getItems(o)
        lvc=listitems_getCount(lvi)
        for k=0, lvc-1 do
          li=listitems_getItem(lvi,k)
          address=listitem_getCaption(li)
          s=listitem_getSubItems(li)
          string=strings_getString(s,0)

          file:write(string)
          file:write("\n")
        end

        break
      end
    end
   file:close()
    break
  end
end


What I'm looking for is a script that will scan for new strings that fit a regular expression and write them to a file at certain intervals. If it's not possible to determine if the strings are new or have been read before its fine I can always delete duplicates.
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