Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!blister!canrem![len.turner@canrem.uucp] From: "len turner" Newsgroups: comp.sys.amiga.programmer Subject: filehandle for screen Message-ID: <1991Jun2.848.3626@canrem.uucp> Date: 2 Jun 91 15:10:39 EST Reply-To: "len turner" Distribution: comp Organization: Canada Remote Systems On 06-01-91 at 12:09 John Russel replied: JR>(Under KS 1.3) When a custom screen is in front of the WB screen, and JR>its flag bits contain the value WBSCREEN, any window that tries to open JR>on WB opens on the custom screen instead. Nothing special about the How system friendly is this? If I do something like: twiddle bits to make my screen WB; Execute("pgm-name",NULL,NULL); untwiddle the bits I twiddled before then during the time that other program is running, my screen _is_ the WB screen. Unfortunately, since the Amiga multi-tasks, there may be another app running that decides this would be a good time to open a window on the workbench. Would not that window end up on my screen? This seems to make it all too possible for my app to exit, closing its screen, while someone else's window is still open on it. I suspect this would not have a pleasing effect on the user. Is there a safe way to get around this? I could reduce the time when that could happen by using Execute("run pgm-name", NULL,NULL); but for the purposes of my app I want the other program to be run synchronously. Other wise the user would have an opportunity to muck things up himself. ("never underestimate the stupidity of an end user."). JR>filehandle. Note that the flag bits are only part of a word, so you I managed to mix two separate questions together. The need for a filehandle arises when my app has been called from WB, so has no stdin or stdout and I need to use a routine that only runs from CLI and confidently expects to find valid stdin & stdout (or at very least stdout). In some cases at least I could use something like BPTR hndl=Open("NIL:",MODE_OLDFILE); if(hndl!=NULL) Execute("pgm-name",hndl, hndl); else {do something intelligent about the situation} but I don't know if that would be safe in general. JR>can't just assign WBSCREEN, you have to use a combination of and/or JR>operations. JR>(Under KS 2.0) I understand there is a system-supported way of doing it, JR>but don't know details. I don't have 2.0 on my 500, and considering the current state of my finances it may be quite a while after it becomes available that I do get it. Consequently, information about how easy this would be under 2.0 is not only not very helpful, it's downright depressing. :-( Thanks for the quick reply & help. --Len len.turner@canrem.uucp (len.turner%canrem.uucp@lsuc.on.ca) ...lsuc!canrem!len.turner --- # Amy Reads Her Mail v0.77 # (ALPHA) -- Canada Remote Systems. Toronto, Ontario NorthAmeriNet Host