I'm afraid that will be difficult, unless you pre-put some sort of "spy" object in the patch loaded inside the bpatcher. Then you could communicate with your spy, and ask it for a pointer to the containing bpatcher.
Let's see... (I'm just speculating here, I didn't test this stuff)
At instantiation, your "spy" object (inside the bpatcher) should bind to a symbol known to your "main" object (outside the bpatcher).
Then, at some point, the main object calls a method on the spy and the spy returns its patcher.
You might want the spy to also check if it is actually inside a bpatcher, and to pass the patcher containing the bpatcher. In this way, the main object can check if this patcher and its own patcher are the same.
Anyway, now your main object knows the patcher contained inside the bpatcher, and can do whatever it want with it.
But frankly, it probably makes more sense to have a [receive foo]->[thispatcher] and send scripting messages to "foo"...
Thanks for the idea, it got it working. This is how:
I made this kind of spy object which is included in the bpatcher I create.
In the seperate scripter object an argument is given while creating the first bpatcher which is later used to define a namespace.
The spy object gets the argument from the bpatcher and does:
object_register(namespace, gensym("spy_track_main_patch"), x);
in it's new method.
The scripter object gets the pointer to the patch the spy is contained in with:
spy = object_findregistered(namespace, gensym("spy_track_main_patch"));
Like this creating a bpatcher and elements in the bpatcher can be realized in executing a single c function.