Verifying Command Execution in a Term Macro

Asked 5 months ago, Updated 5 months ago, 16 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


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

© 2023 OneMinuteCode. All rights reserved.