Hello friends,
I am trying to develop a screen scraping program that will start a legacy emulator (which is using ALC protocol), run a few commands, and then return the result set (screen dump - in character format, like Ctrl-A / Ctrl-C in Notepad to copy all in the notepad) after each command execution. You might have figured out that the actual program is going to be very complicated, but I would like to concentrate on screenscraping so that I could get the so called easy part out. To start with I need to know if I can write the screen scraping program using Java? If so, I would appreciate any leads on the same. Will it be dependent on the protocol? I am assuming that since the execution would happen on windows based PC, and the emulator runs on the same PC, it should not matter which protocol the emulator actually uses to connect to the underlying legacy system. Please correct me if I am wrong.
If you guys have come across any source codes (or have any source codes) that can demonstrate the screen scraping, I would appreciate if you could share the same with me.
In the absence of any existing working demo/code, May be someone could write a simple screen scraping program that does the following:
1. Open 'calc.exe' - The inbuilt microsoft calculator.
2. Read a flat file from designated folder which has commands like:
3+4=
5*6=
8/2=
EOF
3. Execute all the commands from the above file, and save the output in a separate flat file with the original command with the result set, so the output file could look like:
3+4=7
5*6=30
8/2=4
EOF
4. Note that the calc supports Ctrl-C so the output could be captured using Ctrl-C. If you have not seen the 'help' of calc you may find the same interesting, especially the sections that talk about 'keyboard and keypad' -> Using Key Sequences as functions OR Using Keyboard equivalents of Calculator.
I would appreciate any help or guidance.
Thanks and Regards,
Pratik