Ticket #47569

Wait and Waitln

Eröffnet am: 2023-03-12 20:08 Letztes Update: 2023-03-13 08:38

Auswertung:
(Anonym)
Verantwortlicher:
(Keine)
Status:
Offen
Komponente:
Meilenstein:
(Keine)
Priorität:
9 - Höchste
Schweregrad:
5 - Mittel
Lösung:
Keine
Datei:
Keine
Vote
Score: 1
100.0% (1/1)
0.0% (0/1)

Details

Hello. I would just like to inquire about the difference of wait and waitln in a setup? I've been using it on a macro in which has a wait for "Username:" and "Password:" strings. What would be best and should I use flushrecv for every wait command? Thank you.

Ticket-Verlauf (3/4 Historien)

2023-03-12 20:08 Aktualisiert von: None
  • New Ticket "Wait and Waitln" created
2023-03-13 00:53 Aktualisiert von: nmaya
  • Typ Update from Fehler to Supportanfragen
Kommentar

Hi,

I think that if you want to wait "Username:" and new line, waitln is better.

It's better to call flushrecv if the string you're waiting for could come from the host.

Thanks,

2023-03-13 03:05 Aktualisiert von: None
Kommentar

Reply To nmaya

Hi, I think that if you want to wait "Username:" and new line, waitln is better. It's better to call flushrecv if the string you're waiting for could come from the host. Thanks,

I have tried both wait and waitln for it. I do have a timeout too, since some switches don't have a Username prompt. But there seems to be a problem?

Code snippet:

timeout = 8

waitln 'Username:'
if result=0 goto swPass
if result=1 goto swUser
flushrecv
Any suggestions? Thanks.

(Edited, 2023-03-13 08:23 Aktualisiert von: nmaya)
2023-03-13 08:38 Aktualisiert von: nmaya
Kommentar

When you login to a switch like this in manually,

Username:
foo

use "waitln" macro command to that switch. But like this,

Username: foo

use "wait" macro command. Please see sample script "login.ttl" in C:\Program Files (x86)\teraterm.

If you care about buffer, call flushrecv before wait or waitln.

Dateianhangliste

Keine Anhänge

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden