Thanks for your rapid answers!
@Seerah:
Sadly your tip with 'GetBackdrop()' doesnt work. That would have been great!
@Phanx:
Thanks for your infos. They will help me further!
But I think, I didn't explain correctly what I need...
...in general I need a Macro that tells me, what texturepath a visible texture on the UI has got, so that I can use exactly this texture for my addons. At first it would really help me, if I could get just the path of the texture on the hightest level/strata. So maybe the thing with 'GetMouseFocus()' could work.
I don't only need just the Icons. That was just an example for what worked (in my first post). In many cases it's really just the backdrop of a frame.
Maybe what I want isn't possible for a single Macro, so an Addon also would do it, if it exists. Otherwise I have to break my workings on my almost finished Addon and build another one that gets me my needed textures.
The perfect solution would be a Tooltip next to the mousecursor, that shows me all the UI textures and their paths from what my mouse is pointing at (from all strata).
btw. my first macro is helpful, if you want to know how a particular frame is called for maybe anchoring another frame to this one.