Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!elroy!ucla-cs!usc!pollux.usc.edu!papa From: papa@pollux.usc.edu (Marco Papa) Newsgroups: comp.sys.amiga Subject: Re: attaching a CLI to a window. Message-ID: <16717@usc.edu> Date: 23 Apr 89 03:12:06 GMT References: <17054@mimsy.UUCP> Sender: news@usc.edu Reply-To: papa@pollux.usc.edu (Marco Papa) Organization: Felsina Software, Los Angeles, CA Lines: 37 In article <17054@mimsy.UUCP> pmf@mimsy.umd.edu.UUCP (Paul M. Franceus) writes: > >Hi all- a question for you. > I want to attach a CLI to a custom window. How do I go about this. I can >attach a console device - passing the window to the console.device in >OpenDevice, but now I want to attach a CLI to this window. any suggestions? I don't know how you can do it with a CUSTOM window, but you can easily do it with a CON: window opened with Open(). The code follows. Note that the Execute() won't return until ENDCLI is typed to the new CLI. static TransferCLI() { LONG error; struct FileHandle *inputfh, *Open(); LONG success; error = 0; inputfh = Open("CON:0/50/640/100/A-Talk Transfer CLI", MODE_NEWFILE); if (inputfh == (struct FileHandle *) 0) { error = -1; } else { WBenchToFront(); success = Execute("",inputfh, 0L); if (success == FALSE) error = -1; Close(inputfh); if (ScreenType) ScreenToFront(screen); } if (error != 0) auto_req2("Can't create CLI"); } -- Marco Papa 'Doc' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= uucp:...!pollux!papa BIX:papa ARPAnet:pollux!papa@oberon.usc.edu "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=