After a while, evidently, several Stata 9
users often find viewer windows proliferating like
rabbits.
What do you do about rabbits?
1. Keep the population down (the Wolfe solution)
================================================
Use the -nonew- option, directly or indirectly.
2. Shoo them away one by one (the mouse solution)
=================================================
Click and shut. Gentle but possibly tedious.
3. Shut them in batches
=======================
. window manage close viewer _all
will, for example, will close them all. Clearly,
you won't want to type that interactively, so
a wrapper is indicated.
. vclose
shuts all viewer windows, while a numlist is
allowed, so that
. vclose 1/4
shuts #1 #2 #3 #4, and if you wish
. vclose "#32"
shuts #32.
Not tested much, but here it is:
*! NJC 1.0.0 9 May 2005
program vclose
version 9
syntax [anything]
if inlist("`anything'", "", "_all") {
window manage close viewer _all
}
else {
capture numlist "`anything'"
if _rc == 0 {
foreach v in `r(numlist)' {
window manage close viewer "#`v'"
}
}
else foreach v in `anything' {
window manage close viewer `v'
}
}
end
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/