Macro to hide all type of windows in an experiment
maniraj
Hello, I am trying to make a macro to hide all type of windows. Following code works good except .ipf, ihf. Any idea why it fails for these two cases.
Macro HideAll()
Variable len,i=0
String list,wn
list=WinList("*", ";","") //fails due to .ipf, .ihf
do
wn=StringFromList(i, list)
len = strlen(wn)
if (len >0)
DoWindow/HIDE=1 $wn
endif
i=i+1
while(len)
End
Variable len,i=0
String list,wn
list=WinList("*", ";","") //fails due to .ipf, .ihf
do
wn=StringFromList(i, list)
len = strlen(wn)
if (len >0)
DoWindow/HIDE=1 $wn
endif
i=i+1
while(len)
End
I have also tried with "SetWindow" but failed. I did try without these extension, still did not work.
Thanks in advance for your interest and help.
Hi,
I think the issue is with DoWindow
In the DoWIndow /Hide=1 $wn work only for certain window types
From the help: windowName is the name of a top-level graph, table, page layout, notebook, panel, Gizmo, camera, or XOP target window. windowName can not be a subwindow path.
It does not seem to apply to procedure or help windows. Also when you close a procedure window other than main one manually you are prompted to select hide or kill.
For procedure windows use the HideProcedures
The HideProcedures operation hides all the procedure windows without closing or killing them.
Andy
May 30, 2020 at 08:46 am - Permalink
In reply to Hi, I think the issue is… by hegedus
Oh, very nice. Thank you for prompt reply and solution!
May 30, 2020 at 12:39 pm - Permalink
You're Welcome.
Andy
May 30, 2020 at 01:05 pm - Permalink
I might chime in here with a reference to a package that does nicely to manage windows, WindowDesktops.
https://www.wavemetrics.com/project/ACL_WindowDesktops
I find it useful to keep down the clutter in an experiment with many windows.
May 31, 2020 at 06:13 am - Permalink
In reply to I might chime in here with a… by jjweimer
It's really nice package! Thanks to let me know. Downloaded and installed for regular use.
May 31, 2020 at 07:54 am - Permalink