comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Close window command?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Close window command? [message #49395] Mon, 24 July 2006 12:32 Go to next message
adisn123 is currently offline  adisn123
Messages: 44
Registered: July 2006
Member
Hello,

My program generates 4 different images in 4 different window in one
operation.

It is quite tedious to close every window after display to run the
program again after I change some

parameters in the program in order to see new 4 images.

I'm wondering there is a way to kill/close the old windows when the
program starts over.

Thank you.
Re: Close window command? [message #49488 is a reply to message #49395] Mon, 24 July 2006 13:59 Go to previous message
adisn123 is currently offline  adisn123
Messages: 44
Registered: July 2006
Member
Thank you all for the advice above.
Those were the ones that I was looking for exactly.

Thanks again.

Paul Van Delst wrote:
> Mike Chinander wrote:
>> In article <1153769529.483637.316050@h48g2000cwc.googlegroups.com>,
>> <adisn123@yahoo.com> wrote:
>>
>>> Hello,
>>>
>>> My program generates 4 different images in 4 different window in one
>>> operation.
>>>
>>> It is quite tedious to close every window after display to run the
>>> program again after I change some
>>>
>>> parameters in the program in order to see new 4 images.
>>>
>>> I'm wondering there is a way to kill/close the old windows when the
>>> program starts over.
>>>
>>> Thank you.
>>>
>>
>>
>> This should delete all open windows:
>>
>> IDL> while !D.WINDOW ne -1 do wdelete
>>
>> if you know the window indices of the four windows your program creates, you can do:
>>
>> IDL> wdelete, w_ind1, w_ind2, w_ind3, w_ind4
>>
>> where w_ind1, w_ind2, ... correspond to the window indices of your open windows.
>>
>> Hope that helps,
>
> Or, if you want to add more open windows in the future (hey, computer screens are getting
> bigger all the time!) you could do:
>
> nWin=4
> winID=lonarr(nWin)
> for i=0,nWin-1 do begin
> window, /free
> winID[i]=!d.window
> endfor
>
> ...do stuff....
>
> ; plot to first window
> wset, winID[0]
> plot, .....
>
> ; plot to second window
> wset, winID[1]
> plot, .....
>
> etc....
>
> ; done
> for i=0,nWin-1 do wdelete, winID[i]
>
>
> ?
>
> Increase nWin as required.
>
> Using the above you could have additional windows open that you *don't* want destroyed
> every time you rerun your code.
>
> Or, even more simply, you could just do
> !p.multi=[0,2,2]
> and avoid the multiple windows altogether. :o)
>
>
> paulv
>
> --
> Paul van Delst Ride lots.
> CIMSS @ NOAA/NCEP/EMC Eddy Merckx
> Ph: (301)763-8000 x7748
> Fax:(301)763-8545
Re: Close window command? [message #49490 is a reply to message #49395] Mon, 24 July 2006 13:23 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Mike Chinander wrote:
> In article <1153769529.483637.316050@h48g2000cwc.googlegroups.com>,
> <adisn123@yahoo.com> wrote:
>
>> Hello,
>>
>> My program generates 4 different images in 4 different window in one
>> operation.
>>
>> It is quite tedious to close every window after display to run the
>> program again after I change some
>>
>> parameters in the program in order to see new 4 images.
>>
>> I'm wondering there is a way to kill/close the old windows when the
>> program starts over.
>>
>> Thank you.
>>
>
>
> This should delete all open windows:
>
> IDL> while !D.WINDOW ne -1 do wdelete
>
> if you know the window indices of the four windows your program creates, you can do:
>
> IDL> wdelete, w_ind1, w_ind2, w_ind3, w_ind4
>
> where w_ind1, w_ind2, ... correspond to the window indices of your open windows.
>
> Hope that helps,

Or, if you want to add more open windows in the future (hey, computer screens are getting
bigger all the time!) you could do:

nWin=4
winID=lonarr(nWin)
for i=0,nWin-1 do begin
window, /free
winID[i]=!d.window
endfor

...do stuff....

; plot to first window
wset, winID[0]
plot, .....

; plot to second window
wset, winID[1]
plot, .....

etc....

; done
for i=0,nWin-1 do wdelete, winID[i]


?

Increase nWin as required.

Using the above you could have additional windows open that you *don't* want destroyed
every time you rerun your code.

Or, even more simply, you could just do
!p.multi=[0,2,2]
and avoid the multiple windows altogether. :o)


paulv

--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
Re: Close window command? [message #49491 is a reply to message #49395] Mon, 24 July 2006 12:50 Go to previous message
mchinand is currently offline  mchinand
Messages: 66
Registered: September 1996
Member
In article <1153769529.483637.316050@h48g2000cwc.googlegroups.com>,
<adisn123@yahoo.com> wrote:
> Hello,
>
> My program generates 4 different images in 4 different window in one
> operation.
>
> It is quite tedious to close every window after display to run the
> program again after I change some
>
> parameters in the program in order to see new 4 images.
>
> I'm wondering there is a way to kill/close the old windows when the
> program starts over.
>
> Thank you.
>

This should delete all open windows:

IDL> while !D.WINDOW ne -1 do wdelete

if you know the window indices of the four windows your program creates, you can do:

IDL> wdelete, w_ind1, w_ind2, w_ind3, w_ind4

where w_ind1, w_ind2, ... correspond to the window indices of your open windows.

Hope that helps,

--Mike


--
Michael Chinander
m-chinander@uchicago.edu
Department of Radiology
University of Chicago
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Deleting a variable from a NetCDF file
Next Topic: Re: Precision Problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:36:09 PDT 2025

Total time taken to generate the page: 0.00684 seconds