I've done things that sound similar to this, but it is not exactly clear to me what you are trying to do.

If you elaborate a bit, e.g. maybe provide an example, I might have some ideas (maybe).