You say you've finally gotten windows opening and closing properly on the desktop, but can't seem to get any text printed inside one? Normally when you use C printf() prints text to the screen. However, the ST's OS has two distinctly different sections handling text input and output. When printing text inside windows, remember the windows are GEM based, so you'll need to use the GEM-based text output command v_ gtext(). When printing strings through TOS, however, printf() works fine. There's also Cconws(), which operates closely to printf(), and Bconout(), which will output individual characters.
If you plan to open up your 520ST, to upgrade memory or make other hardware changes, be warned! Not only will you void your warranty, but you have a chance of damaging your ST's plastic case. There are six screws which hold the ST case together: three along the back and three along the front. The front screws are slightlysmaller than the rear ones. If you screw the rear screws into the front holes, there is a good chance the screw points will pop out of the topof the ST case, right where your hands rest while you type. Be careful!
Need to detect which Function Key you've hit? How about detecting if the [RETURN] key or the [ENTER] key was selected? Easy. If you're not using GEM, use Bconstat(2)and Bconin(2).Bconin(2)will return a 32 bit value with an ASCII value in the low 8 bits of the lower 16 bits and a scancode in the low 8 bits of the upper 16 bits. In case the ASCII value is identical for different keystrokes, like [RETURN], [ENTER] and ^ M, the scan code will distinguish them. Function keys have an ASCII value of zero, but have unique scan codes, which may be found in your GEM documentation.
(Editor's note: Got an ST trick or tip to share? Send it to START, attention CLIPBOARD.)