How to easily close all open accessories

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Count
Atarian
Atarian
Posts: 4
Joined: Sat Sep 16, 2017 9:15 am

How to easily close all open accessories

Postby Count » Sat Jul 28, 2018 6:17 pm

Hi everyone,

how can I send an AC_CLOSE message to all open desk accessories?

I want to do that in my application at the point when it executes another program. The Atari desktop does so before starting a program and e.g. the Gemini desktop does so, too.

We are not talking about multitask environments.

Is there any chance to get the IDs of running accessories from AES to send them messages? appl_find() needs a certain file name. Or do I really have to check the root directory of the boot drive for all "*.ACC" and "*.CPX" files? 8O

I am running TOS 2.06 on my Mega STE and recognized that active accessories remain open after starting another program, but they don't receive a WM_REDRAW message. Because of that, they appear as a box filled with desktop background.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12498
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: How to easily close all open accessories

Postby wongck » Sun Jul 29, 2018 12:48 am

I program mostly for mint but my guess is that active accessories remains open and do not receive WM_REDRAW is because you did not return control back to the AES for it to do that. Try to use appl_yield() to see if that helps or make an event_timer().
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

Count
Atarian
Atarian
Posts: 4
Joined: Sat Sep 16, 2017 9:15 am

Re: How to easily close all open accessories

Postby Count » Tue Jul 31, 2018 2:27 pm

I found a solution in the Teradesk source code.
Teradesk simply closes all open windows.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12498
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: How to easily close all open accessories

Postby wongck » Wed Aug 01, 2018 11:47 am

there's always another way to skin a fruit. :mrgreen:
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 5 guests