• Support
  • Articles
  • Resources
  • Products

Reaction on the word "ok"

Moderator: boris

3 postsPage 1 of 1

POWERSOFT
Newbie

Posts:
2
Joined: Mon Jun 11, 2012 9:50 am
by POWERSOFT » Mon Jun 11, 2012 9:58 am
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
dpena
Coach

Posts:
139
Joined: Thu Jul 09, 2009 6:14 pm
by dpena » Mon Jun 11, 2012 2:23 pm
Hi,

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

Example:

Code: Select all

  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.  
POWERSOFT
Newbie

Posts:
2
Joined: Mon Jun 11, 2012 9:50 am
by POWERSOFT » Tue Jun 12, 2012 7:28 pm
hi,

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

cheers,

jan
Display posts from previous:
Sort by:

3 postsPage 1 of 1

Users browsing this forum: No registered users
cron