View previous topic :: View next topic |
Author |
Message |
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Sun Oct 03, 2021 8:03 am Post subject: Address reference by Structure.Element [Solved] |
|
|
I was unaware about this feature, till recently. And i would now like to write a function that produces/add such memrecord from within the 'Dissect Data structure' form:
goal: achieve [ https://imgur.com/icc75P9 ]
I see 2 approaches:
a) (preferable): add the currently selected Element to the addresslist, following right_Bottom convention (instead of left_bottom convention as done now)
> my issues: (no functions for ?)
1) how to get my currently selected element (i could always ask for current offset as workaround)
2) how to get parent of current structure.
b) use the left_bottom memrecord, to collect info from appropriate structures. that should definitely be do-able currently; but first want to know if a) is a no-go atm...
ps: in the image, the last offset should show 'Character.PrimaryActor...etc' (had not yet created a 'Character' struct for that)
Last edited by paul44 on Sat Oct 09, 2021 2:24 am; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sun Oct 03, 2021 1:35 pm Post subject: |
|
|
in the treenode of the structure window, the parent of nodes contain a pointer as integer to the structure it's describing in the children.
example on how to get/use that data:
Code: |
elementStructure=integerToUserData(sf.tvStructureView.Selected.Parent.Data)
element=elementStructure.Element[sf.tvStructureView.Selected.Index]
|
and to get the current base address you can do:
Code: |
sf=enumStructureForms()[1]
for i=0,sf.columnCount-1 do
if sf.Column[i].Focused then
printf("%x",sf.Column[i].Address)
end
end
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
|
Back to top |
|
|
|