Re: closing a macro completely upon connect



Scott Caissie wrote:

Its this that I'm trying to understand.
You're saying that Macros can be executed in connect mode BUT can not run in
connect mode with the fix?
Then this fix is something that has no use to me.
I already created a work around to activate any macro via connect mode. I
want it to actively run while in connect mode.

This here was worded bad:
ftp://kermit.columbia.edu/kermit/k95/newbugs.txt
735. Macros on Keys broken

In versions 1.1.21 through 2.1.3, when a SET [TERMINAL] KEY definition
includes a macro invocation, then pressing the key while in the
Terminal screen returns to the command screen (and in some cases might
also fail to execute the macro).

All this time I was thinking the act of going to the command screen upon
invokation was the bug itself. It says 2 things. The secondary issue isn't a
concern.


Why is this a concern to you? Because your work around is running
into stack overflow errors because are executing too many macros.
That's how this discussion started. By fixing the bug you don't
overflow the macro table.

I don't know why the above includes "(and in some cases might also fail
to execute the macro)" because as far as I am aware the macro is never
executed when bound to a key and the key is pressed while in CONNECT mode.

Kermit 95 will never work the way you want it to because the command
parser is not thread safe. The Kermit 95 command parse is exactly the
same as the C-Kermit command parser and C-Kermit is a single threaded
application. It has never been a priority for Columbia University
to turn the Kermit Script Language and the engine that implements it
into a thread safe language.

Background program:
Actively saving the scrollback buffer and analying the last 30 lines which
is slightly more than a full screen worth of work, and do various events.
I have about 7-8 macros which upon activation causes a 'blink' effect. Jumps
to the command window, does the code involving the scrollback or something
else, and jumps back to the terminal. As far as my co-workers are concerned,
the macro 'reads the screen'. I wanted to remove the 'blink' effect. Not all
the users are comfortable with something that visually appears unstable.

So you want to be able to configure a mode that gives control to the
command parser and does not switch the display image. The concern here
being that if something goes wrong with your macro, then you have no way
of interacting with it.

If I was still working on Kermit I would consider adding such a

SET TERMINAL MACRO-DISPLAYS-TERMINAL {ON, [OFF]}

option but it had better be used only when you know your macros work
correctly

I do have a technical question.
Lets say I have a macro that calls another macro (which this buggy one
does). If success, it does XX and Connects. If failure, it does nothing
aside from Connects.
Now if the ONLY means of getting to the Command window is through a Macro'd
hotkey, when it is used, does it cancel the immidate macro (which was paused
via the Connect command), or does it cancel all levels of the macro? (ie:
The parent macro which summoned it?). I think that is what is happening.
That afterall is what this thread is about. Not the macro invokation bug,
but the Macros being nested issue.

If you call macro A and that macro calls macro B and then calls CONNECT
then the call to CONNECT prevents macro B from ending. If the CONNECT
was from macro A then when you get to the terminal mode you are still
at the same macro level as you were when you started.

define test1 {
........
; checks keyboard cursor location. if success, then it does the rest
; this allows 1 key to be used to activate many macros. 1 at a time though
based on where you are in your work
; until this point, I never had macros calling macros.
if .... do test2
connect
return
}
define test2 {
; read scrollback
; output value
connect
return
}

And this is where your problem is when test2 executes you are pushing
the stack. When you execute CONNECT from there the stack does not get
popped.

In order to make your macros portable such that they can be executed
from both command mode and connect mode, you want to replace the CONNECT
line with

IF TERMINAL-MACRO CONNECT

so that you only enter connect mode if you were coming from there.

I am right in guessing that if you could execute this macro by using
the CONNECT /TIME-LIMIT:<sec> option you would provided that the
terminal display was consistently displayed to the user?

Jeffrey Altman
.



Relevant Pages

  • Re: closing a macro completely upon connect
    ... fixed the bug associated with SET KEY and terminal mode, ... invoking a macro as a kverb works. ... interactively from the command prompt. ... A macro mapped to a key will not execute if you enter CONNECT mode ...
    (comp.protocols.kermit.misc)
  • Re: How to insert pdf attachment with word email merge?
    ... "Then execute to a new document the mail merge that you want to send out by ... document when you run the macro. ... Doug Robbins - Word MVP ...
    (microsoft.public.word.mailmerge.fields)
  • Re: PC Word Macro Not Working in Mac Word
    ... I wrote my original in Mac Word, ... .Execute Replace:=wdReplaceAll ... Do ' A post-test loop! ... I did a test macro with basically just the code you ...
    (microsoft.public.mac.office.word)
  • Re: closing a macro completely upon connect
    ... Fix basically states that macros can be run from the Terminal without the ... Macros only execute in "command mode". ... Invoking a macro in the Terminal while another macro is ...
    (comp.protocols.kermit.misc)
  • Re: Code wont execute Main Macro Calls - non breaking spaces
    ... I am going to attach my first array which is the same as you have ... So each macro will execute one after the other. ... separated each find string and each replace string for the sake of ...
    (microsoft.public.word.vba.general)