Re: ok fine, screw military courts but?
Yes build a wall of China all around Pakistan and invade those ares which are safe heavens for these groups.
Make sure each and every grown up of Pakistan is educated enough and has a economic stake in Pakistan.
If people have nothing to lose and have no stakes in being a productive part of they society they can easily exploited for one reason or the other.
How can this be done? If Army can be used for building dams , rebuilding infrastructure after a natural disaster then they can be used for mass education and creating economic opportunities.