29 March 2020, 09:54 | #1 |
Registered User
Join Date: Feb 2020
Location: Here, there and everywhere
Posts: 9
|
Simple CLI program to close all open windows?
Hi EAB,
Is there a program that runs via CLI/AmigaDOS script that will simply close (or kill) all open programs and drawers in WB except the script it's running from? Preferably 68000/KS 1.3/512kb+512kb compatible. The only program I can find that has this functionality is DesktopToilet which I found at: http://cd.textfiles.com/amigama/amigama199803/WWW/ctools/www.ctools.pp.se/DT/index.html ...but unfortunately it requires 8MB of fast RAM for some reason, and only runs on KS 2.0+. I'm not looking for any commodities or GUI programs, and I'm not interested in using ARexx since I'm trying to keep my scripts KS 1.3 compatible. Last edited by DEAT; 29 March 2020 at 09:55. Reason: remove excessive new lines |
29 March 2020, 10:52 | #2 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,686
|
There is no system-legal way to do this prior to OS3.5.
|
29 March 2020, 13:56 | #3 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,035
|
|
29 March 2020, 17:13 | #4 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,686
|
I was thinking of WB windows, missed the part about programs.
There's no way to close programs and deallocate all their resources safely on any version, as there is no record kept of what task owns what resource. |
30 March 2020, 09:28 | #5 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Closing wb drawers isn't explicitly needed, just close wb itself.
For running apps, i guess you could just open a popup asking the user to close all of them. But this brings the question : why wanting to do that. If you just want to bring the system down, no need to close apps before. |
30 March 2020, 14:53 | #6 |
Registered User
Join Date: Feb 2020
Location: Here, there and everywhere
Posts: 9
|
That's unfortunate, thanks for helping!
It's mostly for freeing up RAM on low-end Amigas, as I've noticed that parent drawers still remain in RAM after they've been closed until the last child drawer has been closed. I've noticed a couple of games which can run from HD (despite not being intended to) don't bother checking for available RAM before throwing a guru, so I was hoping for a failsafe. Doing a check for available RAM and aborting the script is a fine alternative, it just means doing more trial and error on top of figuring out what can run on HD beyond what HOL has listed |
30 March 2020, 15:19 | #7 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,310
|
Why not upgrade some more RAM then?
|
31 March 2020, 05:49 | #8 | |
Registered User
Join Date: Nov 2015
Location: Perth, Australia
Posts: 73
|
Quote:
If not, and you're a programmer, there is an OS function to close WB, CloseWorkBench. It attempts to close the Workbench screen to free up memory however it probably won't work if you've got other windows open on that screen. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No signals in library open/close code? | AGS | Coders. System | 10 | 29 November 2017 17:31 |
Can an amiga program close WinUAE? | xxxxx | support.WinUAE | 3 | 06 August 2014 06:21 |
External windows program communicating with program running inside WinUAE | xxxxx | support.WinUAE | 10 | 19 February 2013 09:27 |
Need a small win98 prog, to open and close a directX screen... | keropi | Retrogaming General Discussion | 9 | 25 April 2008 18:43 |
|
|