TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: SAMMY MITCHELL
date: 1997-11-13 02:43:00
subject: RE: Doing Stuff and then starting spellc02:43:0311/13/97

From: Sammy Mitchell 
David Marcus[SMTP:DavidMarcus@MindSpring.com] wrote:
> Is there a way to record a keyboard macro and have recording stop after you
> start a process such as spell checking?
> 
> For instance, i want to record a macro that closes my current file, does a
> search and replace on the next file, and starts spell checking it.  Is 
here
> any way to do this?
Try the following - it seems to work for me, your mileage may vary!
/**************************************************************************
  Turn off keyboard macro recording at any time.  Assumes that  is
  your key to toggle recording.  If not, change the constant below.
 **************************************************************************/
constant TOGGLE_KEYMACRO_RECORDING = 
/**************************************************************************
  Hooked routine that gets called just after every keypress, but before the
  key is given to the editor to process.
  If we are currently recording a keyboard macro, and the 'toggle macro
  recording' key is pressed, turn keyboard macro recording off.
  This allows us to turn off keyboard macro recording at *any* time the
  editor reads a key.
 **************************************************************************/
proc AfterGetKey()
    if Query(KbdMacroRecording) and Query(Key) == TOGGLE_KEYMACRO_RECORDING
        Set(KbdMacroRecording, off)
        Set(Key, -1)			// tell TSE to ignore the key
    endif
end
proc main()
    Hook(_AFTER_GETKEY_, AfterGetKey)
end
-- 
Sammy Mitchell,  SemWare Corp.
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.