Ticket #47569

Wait and Waitln

Date d'ouverture: 2023-03-12 20:08 Dernière mise à jour: 2023-03-13 08:38

Rapporteur:
(Anonyme)
Propriétaire:
(Aucun)
État:
Ouvert
Composant:
Jalon:
(Aucun)
Priorité:
9 - le plus élevé
Sévérité:
5 - moyen
Résolution:
Aucun
Fichier:
Aucun
Vote
Score: 1
100.0% (1/1)
0.0% (0/1)

Détails

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 History (3/4 Histories)

2023-03-12 20:08 Updated by: None
  • New Ticket "Wait and Waitln" created
2023-03-13 00:53 Updated by: nmaya
  • Type Update from Bogues to Demande de soutien
Commentaire

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 Updated by: None
Commentaire

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 Updated by: nmaya)
2023-03-13 08:38 Updated by: nmaya
Commentaire

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.

Attachment File List

No attachments

Modifier

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