Create a data probe for slicelet

How to create a data probe for a slicelet that has no main window?
I had tried code given in nightly scripted modules,but it is only working in presence of main window only,

Behavior of application without a main window would be so different that we do not support this option anymore. There wouls be a huge additional cost in review, testing, and maintenance, for very little the benefits.

Instead, you can have a main window and hide (or do not create) any elements that you don’t need. This is how all the custom applications work now.