29 October 2021, 22:08 | #1 |
Registered User
Join Date: Oct 2021
Location: England
Posts: 1,171
|
Blitz/Amiblitz - Simple way to detect if workbench screen is active/loaded?
I am remaking an old tool i made years ago that works as a Do-Everything kind of launcher, originally i made it to be a startup-sequence selector only with some degrade options and kickstart changing options thrown in, i still have the executables i made (and still use them now) but i lost the code ages ago so cant tweak anything, as such i am remaking it.
Now however i am expanding what it can do and making it a game/utility/demo/more launcher, as well as my startup-sequence stuff, the most basic thing i would like is to have it open its window on workbench as default (already does that now) so if i launch the program when workbench is active it just works like any normal program, but if i hold my RMB during reboot i launch it before workbench appears and would like it to know this and open its own screen instead when it knows workbench doesnt exist. Can this be done in a system friendly way? Is there a simple command or method to detect if workbench is loaded or the workbench screen is running, i saw a findscreen command but that doesnt really do as it suggests. |
30 October 2021, 22:04 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
There's a WorkbenchHere function that seems to do what you're looking for. It returns True if Workbench is open and False if it's closed. It's part of the RI add-on libraries, which are included in most distributions except the most basic floppy-type setups.
|
31 October 2021, 01:33 | #3 |
Registered User
Join Date: Oct 2021
Location: England
Posts: 1,171
|
nice, exactly what i needed, thanks.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Detect CD32 pad connected in Blitz? | earok | Coders. Blitz Basic | 19 | 05 April 2022 01:01 |
Blitz Basic / AmiBlitz on AmigaCoding.com | Daedalus | Coders. Blitz Basic | 8 | 08 January 2021 15:56 |
Detect KS version & boot appropriate Workbench? | Rekrul | support.Apps | 2 | 11 November 2012 04:43 |
Can amiblitz (blitz basic2) blit an image per bitplane? | Michael Parent | Coders. General | 7 | 29 October 2009 17:59 |
Blitz Basic 2.x (AmiBlitz, now?) in ADF format? | Unregistered | Amiga scene | 1 | 30 November 2001 10:46 |
|
|