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 


Copying the pointerscan results to clipboard

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> LUA Tutorials
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 338

Joined: 09 May 2003
Posts: 19833
Location: The netherlands

PostPosted: Tue Jun 04, 2013 6:42 pm    Post subject: Copying the pointerscan results to clipboard Reply with quote

Sunbeam was bugging me about this, but because it is too specific to be implemented in the ce source (everyone wants a different format) I'm posting a lua script that will find the pointerscan window and write all the results to clipboard (you can modify it to write to file)

Code:

--execute this to copy all entries in the pointerscan window to clipboard
for i=0, getFormCount()-1 do
  local f=getForm(i)
  if object_getClassName(f)=="TfrmPointerscanner" then
    --found it, now find the listview (which is lazily called ListView1
    local lv=component_findComponentByName(f,"ListView1")
    local lvi=listview_getItems(lv)
    local count=listitems_getCount(lvi)

    if count>20000 then
      error("Sanity check triggered. If you are insane, remove this check");
    end

    local j
    cb=""
    for j=0,count-1 do  --change this manually if you know the line numbers you want
      local item=listitems_getItem(lvi,j)
      local subitems=listitem_getSubItems(item)

      cb=cb..listitem_getCaption(item)

      local offsets
      for offset=0,strings_getCount(subitems)-1 do
        cb=cb.." - "..strings_getString(subitems, offset)
      end
      cb=cb.."\n\r\n\r"

    end

    writeToClipboard(cb)
  end
end


If you want to hexadecimal notation of the base instead of modulename+offset (for whatever screwed up reason) change
Code:

      cb=cb..listitem_getCaption(item)

to
Code:

      cb=cb..string.format("%x", getAddress(listitem_getCaption(item)))

Just make sure that you have targeted the correct process when doing this

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
SunBeam
I post too much
Reputation: 64

Joined: 25 Feb 2005
Posts: 4012
Location: Romania

PostPosted: Tue Jun 04, 2013 7:09 pm    Post subject: Reply with quote

The 'screwed' up reason would be working with another tool (Olly) which doesn't support 'filename'+offset. It wants an address Smile

Thanks,
Sun

_________________
More stuff on sb.deviatted.com. Work in progress.
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 42

Joined: 12 Mar 2012
Posts: 1283

PostPosted: Wed Jun 05, 2013 12:57 pm    Post subject: Reply with quote

Olly supports label addressing, so if you place a label called "application" at the base address of your application you can have an equivalent of module addressing. Granted you'll have to replace "application.exe" by "application" in the output of the lua script.
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 Tutorials -> LUA Tutorials 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites