Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture a screen to compare

Status
Not open for further replies.

Matta25

Technical User
Jan 6, 2004
82
0
0
US
I have a script that logs into a BBS and goes through a menu system. It gets to a download area where it give me a list of files like this:
1.* file1
2.* file2
3. file3
4. file4

The file that have an * by them are file that were already downloaded the day before. The ones without the * are the file I need to download.
Is there a way to have procomm capture this list on the screen to a file so I can then have the script compare this list and only download files 3 and 4.
Any ideas would help.
thanks.
 
Try this:

string Name = "files.txt" ;Name of the File.
string pathname ;Path to the Aspect directory.
string filename2 = "\files.txt"
string command = "notepad.exe /p " ;Command to run notepad.
set aspect path "C:" ;set script path
set capture path "C:" ;set capture file path


fetch aspect path pathname;find the current path to file
strcat pathname filename2 ;Adds the path and text file
snapshot FILE Name APPEND ;Captures the text from the screen
strcat command pathname ;Adds all three strings togther
run command ;Runs notepad--saves the file.
pause 10


;snapshot will capture whatever is on the terminal screen. You'll then have to have another script that opens and reads the text file

Something like this:
string sLine
integer A = 0

fopen 1 "C:\files.txt" READ TEXT
while not feof 1
fgets 1 sLine
if strfind sLine "*"
A++
else
...Whatever you'd have to do to download

endif
fclose 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top