[net.micro.amiga] Amiga BASIC I/O questions

kurt@fluke.UUCP (Kurt Guntheroth) (08/20/86)

[ eat by bits ...]

I have a question about AmigaBASIC I/O.  This question is extremely
frustrating to me since I believe I have already seen the answer to
it, but cannot remember it nor find the reference in my archives.  Please
oh developers and C gurus, have mercy on a person who lives with BASIC
when there is better stuff around.

I wish to write a multi-window program that takes input from a particular
window.  I want that window to be made active in the sense that a window
usually becomes active when you click the mouse in it.  That is, I want
INPUT statements to not flash the screen when I type, and echo the input
characters in the selected window.  It seems that if you start AmigaBASIC
from the menu, the listing window may be active, and you must click the
mouse in the output window to make it active.  Furthermore, my program
creates another window using the WINDOW statement.  This window seems to
become active, so I have to click again in the output window to make it
collect my input.  Use of the WINDOW and WINDOW OUTPUT statement do not seem
to have the effect I desire, but perhaps I am using them incorrectly.

1.  Is there a way to make an arbitrary window active so that INPUT statements
echo their input characters on that window?  If not, do I have to open the
keyboard as a file and do my own echoing and char-to-number conversion?

2.  Am I doing something stupid or overlooking something in the AmigaBASIC
manual?   If so, point me to the relevant passage and I will slink silently
off.

3.  I don't think the manual is very well designed.   Is there a better source
for AmigaBASIC reference?

Thank you for your support
Kurt Guntheroth

danny@convex.UUCP (08/24/86)

[ Ravenous Line-Eating Bug of Traal Repellant here ]

The best way is to use the WindowToFront() command.  You will need an
intuition.bmap file.  WindowToFront()'s argument is a pointer to the window.
Be sure to put it in a long/float or something with at least 32 bits.
According to the AmigaBASIC manual: WINDOW x will make window x the current
window and bring it to the front - making it take prints/inputs/graphics.
WINDOW OUTPUT x will make window x current but not bring it to the front.
Whether or not the BASIC ones work, you should not have problems with
WindowToFront().

Hope this helps!

Dan Wallach
...!ihnp4!convex!danny