Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!aplcomm!uunet!mcsun!ukc!icdoc!dbh From: dbh@doc.ic.ac.uk (Denis Howe) Newsgroups: comp.sys.acorn Subject: Re: Desktop editors Message-ID: Date: 17 Jun 91 14:04:08 GMT References: <1991Jun15.122613.12088@demon.co.uk> Organization: Dept. of Computing, Imperial College, London, UK Lines: 31 Nntp-Posting-Host: asun4.doc.ic.ac.uk In-Reply-To: pmoore@cix.compulink.co.uk's message of 15 Jun 91 12:26:13 GMT I agree that it would be nice if !Edit was a bit more extensible and programmable. A recent article in Risc User magazine revealed that not only can you use function key presses to activate most menu functions (eg. control-f2 (Close window), f3 (Save), f4 (Search), f5 (Goto line) etc.) but you can also use function keys to simulate clicking on action icons in the dialog boxes (f1 for the first icon, f2 for the second etc.). ARMed with this knowledge, you can simulate function key presses by inserting characters into the keyboard input buffer with SYS "OS_Byte", 138, 0, c where c is the code to insert. Eg. I use the sequence S$ = CHR$&85 + STR$Line% + CHR$13 REPEAT SYS "OS_Byte", 138, 0, ASC(S$) S$ = MID$(S$, 2) UNTIL S$ = "" to make !Edit jump to line Line%. &85 is the code for the f5 key. I haven't experimented with this much yet but I suspect you could do quite a lot by intercepting keys, stuffing other keys into the buffer and reading the character at the cursor position (can you do this from another application?). Anybody tried this? -- Denis Howe C-C H558A Imperial College London C-C-C +44 (71) 589 5111 x5064 N=N