• Support
  • Articles
  • Resources
  • Products
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead

Solution required. I am not able to read values on th screen

Moderator: boris

5 postsPage 1 of 1

rukmesh
Newbie

Posts:
2
Joined: Thu Aug 16, 2012 10:36 am
by rukmesh » Thu Aug 16, 2012 10:50 am
Hi Guys,

I have a requirement that I login to a Linux box, run an application on the box (this is a C++ application), go to a screen and read the values from the screen line by line and depending on business rule, I should be able to write the values from the screen on to a file.

I am able to do everything else what I want EXCEPT that I cannot read from the screen line by line. I tried filereadln command but that does not help.

I want to loop through the records one by one (I am able to loop) and read the values into variable ( I am not able to do this) and based on some condition, I want to either write the values in a file or move on to the next record.

I am farely new to teraterm macro and help from the experienced guys will really be appreciated.
rukmesh
Newbie

Posts:
2
Joined: Thu Aug 16, 2012 10:36 am
by rukmesh » Fri Aug 17, 2012 9:10 am
Hi,

I am having a problem with TeraTerm macro. To begin with, let me explain you the whole situation.
I have an application running on a linux box. That application is obviously a Character Based Interface (C++ application). It has various screens which display tabular and form like data.
By macro, I am able to login, run the application, go to various screens on the applications, loop through the records on screens, screen scrape etc.
I am stuck at a place where my requirement is that
1. I go to a screen (I am able to do so).
2. Query All the records (I am able to do so).
3. Loop through the records (I am able to do so).
4. While looping, read the record and based on some condition, store them in a file.

I am not able to do the last part (4). I am not able to read the record while my cursor look like it is at that record. I have tried using setsync, recvln etc but nothing works.
One interesting point is that this application has a "status line" and when I do a recvln and display what is received from the remote host, I do not see the record where my cursor is but the value in the status line.

If you can help me in reading the records, it will really be great and I can then automate lots of things and do some performance testing

Thanks in advance.

Rukmesh
IshmaelCallMe
Guru

Posts:
673
Joined: Thu Jan 26, 2006 2:28 am
by IshmaelCallMe » Mon Aug 20, 2012 1:44 pm
It would help if you would post your current script and highlight where in that script you are having trouble.
dpena
Coach

Posts:
144
Joined: Thu Jul 09, 2009 6:14 pm
by dpena » Mon Aug 20, 2012 6:07 pm
cwaters
Newbie

Posts:
22
Joined: Wed Jun 18, 2008 10:00 pm
by cwaters » Tue Aug 21, 2012 4:18 pm
Here's an example of scraping specific parts of a window. This is the method I use.

viewtopic.php?f=13&t=898
"The conclusive proof that intelligent life exists elsewhere in the Universe lies in the fact that no one has bothered to contact us." --unknown
Display posts from previous:
Sort by:

5 postsPage 1 of 1

Users browsing this forum: No registered users
cron