[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wait/sleep in a keyboard macro?
From: |
Sean McAfee |
Subject: |
Re: wait/sleep in a keyboard macro? |
Date: |
Wed, 08 Dec 2010 15:26:44 -0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) |
kent williams <nkwmailinglists@gmail.com> writes:
> (fset 'hardcorps
> [?\M-x ?t ?e ?l ?n ?e ?t ?\C-m ?c ?h ?a ?t ?. ?f ?4 ?. ?c ?a ? ?6
> ?6 ?2 ?3 ?\C-m ?* ?* ?* ?* ?\C-m ?* ?* ?* ?* ?* ?* ?* ?* ?* ?*
> ?\C-m])
>
> in other words: alt-X 'telnet chat.f4.ca 6623' <return> '<login name>'
> <return> '<password>' return
>
> It appears (to me) that what happens is that the macro runs too fast,
> such that when it tries to add the login name to the buffer, the
> buffer isn't yet connected to the server, or it isn't ready for input.
> Or something!
How about advising the telnet function to wait a bit after it runs if a
keyboard macro is executing?
(defadvice telnet (after pause-during-keyboard-macro activate)
(when executing-kbd-macro
(sleep-for 1)))
Season the sleep-for delay to taste.
Not very sophisticated, but it gets the job done.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: wait/sleep in a keyboard macro?,
Sean McAfee <=