• Support
  • Articles
  • Resources
  • Products

How can i store value from tera term screen to any variable?

Moderator: boris

4 postsPage 1 of 1

mayank867
Newbie

Posts:
5
Joined: Thu Apr 06, 2017 1:23 pm
by mayank867 » Mon Apr 10, 2017 10:20 am
I am using Tera term to device communication if I fire command 'switch ok_p' then device sends me a value 10 how can I store this value in any variable so I can use this value runtime in macro.
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 10, 2017 1:13 pm
Is the response line based? I.e. is there an end of line (carriage retrun and/or line feed character) and the end/beginning of the response?

If so then here is an example (not tested) using recvln



And here is an example (not tested) using waitregex which would be my preference as it's very flexible and will just ignore things like command echo.
Last edited by Trevor on Wed Apr 12, 2017 8:02 am, edited 1 time in total.
Trevor
Guru

Posts:
485
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Mon Apr 10, 2017 1:17 pm
Hi,
This seems to be the same question as asked in . It would have been better to post this question there when I asked for an example of what you are trying to send/receive rather than starting a new post. In this question you are providing the example I asked for.
Lagman
Newbie

Posts:
1
Joined: Wed Apr 19, 2017 5:51 am
by Lagman » Sat Apr 22, 2017 9:14 am
Thanks for pointing that out! I didn't know about that thread.
Display posts from previous:
Sort by:

4 postsPage 1 of 1

Users browsing this forum: No registered users