Reaction on the word "ok"
Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Reaction on the word "ok"
PostPosted: Mon Jun 11, 2012 5:58 am 
Offline
Newbie

Joined: Mon Jun 11, 2012 5:50 am
Posts: 2
Hello,

I wont to use TT as a input for my amForth.

When I send line with commands ended with a cr/lf TT should wait to send a new line
until it receives "ok" from amForth.

Can this been done with a macro or something else?

Thanks for any help.

Jan Kromhout
Hellevoetsluis-NL


Top
 Profile E-mail  
 
 Post subject: Re: Reaction on the word "ok"
PostPosted: Mon Jun 11, 2012 10:23 am 
Offline
Coach

Joined: Thu Jul 09, 2009 2:14 pm
Posts: 132
Hi,

Try this
http://ttssh2.sourceforge.jp/manual/en/ ... /wait.html

Example:
  1.  
  2. ;Be sure to set your timeout
  3.  
  4. timeout = 60 ; time in seconds
  5.  
  6. sendln 'show ok message'
  7. wait 'ok'
  8. if (result = 0) goto fail ;This means the "ok" prompt was not seen in the 60second timeout limit.
  9. if (result = 1) goto pass ;This means the "ok" prompt was seen within the 60 second timeout limit.
  10.  
  11. end
  12. ;------------------------------------------------
  13. :fail
  14.   messagebox 'No "ok" message seen' 'User Message'
  15. end
  16. ;------------------------------------------------
  17. :pass
  18.   messagebox '"ok" message seen' 'User Message'
  19. end
  20.  
  21.  
  22.  
  23.  
  24.  


Top
 Profile E-mail  
 
 Post subject: Re: Reaction on the word "ok"
PostPosted: Tue Jun 12, 2012 3:28 pm 
Offline
Newbie

Joined: Mon Jun 11, 2012 5:50 am
Posts: 2
hi,

thanks for it, where to store this code, and how activate it?

cheers,

jan


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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