Verifying Command Execution in a Term Macro

Asked 2 years ago, Updated 2 years ago, 79 views

If you say sendln hoge in the term macro
They execute the command, but
Is it possible to give the user permission to do this?

For example
$ myapp status
myapp is running...
$myapp stop ← Now, I don't want to let it run until I press enter

Thank you for your cooperation

teraterm

2022-09-30 11:18

1 Answers

1. Pause in dialog (use yesnobox if necessary)

messagebox 'Proceed: 'Confirm'

2. Send only the command string and wait for the display string after entering Enter.

send 'stop'
wait 'Character after Enter'

3. Let me type stop manually and wait for it

wait 'stop'

How about the above method?
I don't think there's anything waiting for Enter to be keyed.


2022-09-30 11:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.