Close a selection of Open Windows

This is a fine example of how different RISC OS programs work together. But there is a simpler way of accomplishing this: see end of page!

When updating a large web site that had grown over many years, I found it desirable to know what I was changing, so I needed to close all windows that did not need the change. Loading all as text opened some 300 windows. StrongED does not have a feature to close windows from a List of found. However the WindOpen module from The ARM Club (it is at the end of that page) does have a command *WO_CloseWind <taskname> <window name> so, if I could export StrongED's LoF window to a suitable Obey fie, it looked possible.

For this to work, the windows to close must be visible on screen - albeit behind other windows - not hidden. If in doubt, menu in the WindowList. Item 7 is Show. Click on All in the sub-menu.

Here's how:

Load all files
Pressing Ctrl while dragging a directory to StrongED's iconbar icon will open a window allowing you to load all files contained in that directory and all sub-directories.

This Pattern will load all files of type FAF - html.

Pattern faf, **
Mark block you wish to weed out
You will be trying to close all files with a certain word, phrase in it. Mark that word or phrase
Make a List of Found (LoF)
Press F2 to open the LoF dialogue box.
Press F7 to copy the marked search term to the
Select All texts
Save the List of Found in suitable format.
Press Menu in LoF window. Adjust (right) click the 6th entry - Filename
Save the list to StrongED
Process the list
as the list is in a well defined format, two advanced search and Replace operations will do this. Both on "This Text":
Search <" "*$
Search " "*$
Finish processing the list:
Press Ctrl-AAA to mark the whole text
Make sure the caret is at the start of a line in the marked block and type in WO_CloseWind StrongED , making sure you type the final space!
Save the edited file
Save to anywhere convenient. Save as filetype Obey.
Run the Obey file you have saved.
As the list is likely to be long, see Running Obey Files for a method to bun such a block at a time.

Was this page helpful? Please email me and/or rate this page:

If you want a reply make sure any email address will not get spam-binned!
Optional comment

Other relevant pages

Top of page

Page Information Document URI:
Page first published: 7th April 2018
Last modified:Sat, 09 Nov 2019 14:15:12 GMT
© 2018 - 2024 Richard Torrens.