English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 29 March 2020, 09:54   #1
DEAT
Registered User
 
Join Date: Feb 2020
Location: Here, there and everywhere
Posts: 7
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
DEAT is offline  
Old 29 March 2020, 10:52   #2
Minuous
Coder/webmaster/gamer
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,035
There is no system-legal way to do this prior to OS3.5.
Minuous is offline  
Old 29 March 2020, 13:56   #3
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,946
Quote:
Originally Posted by Minuous View Post
There is no system-legal way to do this prior to OS3.5.
What has been added in 3.5 which makes it more legal? If you think of the Workbench ARexx port, with this you can only close Workbench drawers. You cannot kill running programs and close their windows.
thomas is offline  
Old 29 March 2020, 17:13   #4
Minuous
Coder/webmaster/gamer
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,035
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.
Minuous is offline  
Old 30 March 2020, 09:28   #5
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 47
Posts: 3,692
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.
meynaf is offline  
Old 30 March 2020, 14:53   #6
DEAT
Registered User
 
Join Date: Feb 2020
Location: Here, there and everywhere
Posts: 7
Quote:
Originally Posted by Minuous View Post
There is no system-legal way to do this prior to OS3.5.
That's unfortunate, thanks for helping!

Quote:
Originally Posted by meynaf View Post
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.
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
DEAT is offline  
Old 30 March 2020, 15:19   #7
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,494
Why not upgrade some more RAM then?
daxb is offline  
Old 31 March 2020, 05:49   #8
bwldrbst
Registered User

bwldrbst's Avatar
 
Join Date: Nov 2015
Location: Perth, Australia
Posts: 40
Quote:
Originally Posted by DEAT View Post
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
On Aminet there is a package called CloseWorkBench that might suit your needs.

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.
bwldrbst is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:21.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.06802 seconds with 15 queries