I'm attempting to automate a task that we perform on a daily basis. This task involves the following steps:
1. dialing up to a remote host using Hyperterminal
2. logging in
3. requesting a report
4. then capturing the report to a text file.
I'm trying to figure out if there's a way for my script to wait for a specific prompt (text string) to appear before beginnning the text capture. I really can't rely on the "wait" command because the report always takes a different amount of time to generate before beginning to scroll on the screen.
Any ideas would be greatly appreciated.
Thanks,
Tim
waiting for text in hyperterminal?
Moderators: JRL, Dorian (MJT support)
Sorry, no hyperterminal available on my box.
Would it be possible to get the report if you dial in with "rasphone.exe" (from the commandline), and a download via FTP?
Is there an option in HT, that a log can be written/piped while the processing (like it is with Telnet)?
If yes, no afterwards capturing is necessary.
Would it be possible to get the report if you dial in with "rasphone.exe" (from the commandline), and a download via FTP?
Is there an option in HT, that a log can be written/piped while the processing (like it is with Telnet)?
If yes, no afterwards capturing is necessary.
During this terminal session, the user must request a report. It then takes from 5 to 30 seconds before the report begins.
I prefer to begin Hyperterminal's text capture command when a certain string is encountered on the report. Otherwise, I'll end up having to capture a bunch of preliminary user input.
I was hoping there's a technique to monitor a stream of data with MacroScheduler.
I prefer to begin Hyperterminal's text capture command when a certain string is encountered on the report. Otherwise, I'll end up having to capture a bunch of preliminary user input.
I was hoping there's a technique to monitor a stream of data with MacroScheduler.
But if there's an option to capture the output:
a) Check for the keyword/trigger
b) if it isn't matching, ignore it
c) if yes keep/pipe it
Well, just something to play with ...
a) Check for the keyword/trigger
b) if it isn't matching, ignore it
c) if yes keep/pipe it
Code: Select all
Let>trigger=User: John Doe
Label>TriggerIt
//Let's assume it's possible to capture the output to the clipboard
GetClipboard>line
If>line=%trigger%,Gotcha,TriggerIt
Label>Gotcha
GetClipboard>line
If>line=,Exit
WLN>C:\test.txt,Result,%line%
Goto>Gotcha
Label>Exit
Very interesting approach!
Hyperterminal can't capture to the clipboard. However, based on your concept, Im going to try this.
1. begin text capture to a temp file.
2. perform Readln on temp file until trigger is encountered.
3. stop text capture to temp file
4. start text capture to final file
I'll give that a try and see what happens.
Thanks!
Hyperterminal can't capture to the clipboard. However, based on your concept, Im going to try this.
1. begin text capture to a temp file.
2. perform Readln on temp file until trigger is encountered.
3. stop text capture to temp file
4. start text capture to final file
I'll give that a try and see what happens.
Thanks!