Joined: 09 May 2003 Posts: 20394 Location: The netherlands
Posted: Tue Jun 04, 2013 6:42 pm Post subject: Copying the pointerscan results to clipboard
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
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.
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