wait for data on 2 lines before proceeding
Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: wait for data on 2 lines before proceeding
PostPosted: Wed Nov 25, 2009 2:54 pm 
Offline
Newbie

Joined: Wed Nov 25, 2009 2:32 pm
Posts: 7
Hi.
I am trying to create a macro that will send a specific line, and then wait for specific data that happens to be on 2 separate lines.

When I log in, it responds with the 2 lines below.

TAG COMPLD
;

I want it to wait to send the next line until after it sees both the "TAG COMPLD" and then the ";" right below it.

I tried this, but it did not work.

  1. sendln'activate-userrname:::kw;'
  2. wait'TAG COMPLD'
  3. wait';'
  4. sendln'next-command'


It will send the next command after it see the TAG COMPLD.

Can anyone point me in the right direction please?


Top
 Profile E-mail  
 
 Post subject: Re: wait for data on 2 lines before proceeding
PostPosted: Wed Nov 25, 2009 3:31 pm 
Offline
Guru

Joined: Wed Jan 25, 2006 7:28 pm
Posts: 532
Location: Denver, Colorado, USA
Try putting a space after the wait and before the single quote.


Top
 Profile  
 
 Post subject: Re: wait for data on 2 lines before proceeding
PostPosted: Wed Nov 25, 2009 4:25 pm 
Offline
Moderator, LogMeTT developer
User avatar

Joined: Sat Jan 08, 2005 7:52 am
Posts: 1141
Location: Seattle, WA, USA
If you receive 2 lines there should be CR, LF or both these codes between them.

Try to replace wait with waitln, or with one of the following

wait 'TAG COMPLD' 13 ';'
or
wait 'TAG COMPLD' 10 ';'
or
wait 'TAG COMPLD' 13 10 ';'
or
wait 'TAG COMPLD' 10 13 ';'

_________________
Thanks.
Best regards,
// Boris


Top
 Profile E-mail  
 
 Post subject: Re: wait for data on 2 lines before proceeding
PostPosted: Wed Nov 25, 2009 5:24 pm 
Offline
Newbie

Joined: Wed Nov 25, 2009 2:32 pm
Posts: 7
I get a TYPE MISPATCH on all 4 of those commands.


Top
 Profile E-mail  
 
 Post subject: Re: wait for data on 2 lines before proceeding
PostPosted: Wed Nov 25, 2009 6:01 pm 
Offline
Newbie

Joined: Wed Nov 25, 2009 2:32 pm
Posts: 7
OK.
I put the # key in front of the number.
I ended up using:

wait'COMPLD'#13#10';'

But after it gets past that, it goes ahead and sends all the other commands at once.

I have other wait commands waiting for ';' but they seem to be ignored.


Top
 Profile E-mail  
 
 Post subject: Re: wait for data on 2 lines before proceeding
PostPosted: Wed Nov 25, 2009 7:25 pm 
Offline
Moderator, LogMeTT developer
User avatar

Joined: Sat Jan 08, 2005 7:52 am
Posts: 1141
Location: Seattle, WA, USA
Try adding flushrecv after wait. Also, setsync 1 right after connect command may help.

_________________
Thanks.
Best regards,
// Boris


Top
 Profile E-mail  
 
 Post subject: Re: wait for data on 2 lines before proceeding
PostPosted: Wed Nov 25, 2009 9:18 pm 
Offline
Newbie

Joined: Wed Nov 25, 2009 2:32 pm
Posts: 7
Hmm. No joy.

It still sends the other lines after it gets through the first wait string.

I setsync 1, and did flushrecv after each wait and even before the next command.

Wierd.


Top
 Profile E-mail  
 
 Post subject: Re: wait for data on 2 lines before proceeding
PostPosted: Fri Nov 27, 2009 12:51 am 
Offline
Newbie

Joined: Wed Nov 25, 2009 2:32 pm
Posts: 7
ok, well what I ended up doing is placing a "pause 1" after the "wait ';'" command.

Seems to work ok for now.

Thanks for your help.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group