VOGONS


First post, by inout

User metadata
Rank Newbie
Rank
Newbie

Hello!
I have dos application and i want to automate it for embedding in web interface.
Application outputs text via WriteLn(Written in Tubpo Pascal) i.e. in Windows Xp you can select text from console and past it anywhere.
I have two questions:
1) What is best way to automate keyboard input? I want to write some code for emulation of numbers input and "enter" pressing.
2) What is best way for hooking output characters? After some input i want to get text outputted from program.

If there's not some features for it i know c++ programming and can rewrite some dosbox code for hooking, but i'd like to simplify this process))

Sorry for my bad english)
Thank you in advance

Last edited by inout on 2015-12-27, 22:00. Edited 1 time in total.

Reply 1 of 6, by RacoonRider

User metadata
Rank Oldbie
Rank
Oldbie

The best thing I can think of is a bat file.

You can redirect text output of a program into a txt file. Something like this:

program > output.txt

This should create an "output.txt" file with whatever your program outputs.

It's kind of useful outside your application. This, for example, creates a txt file featuring the contents of current directory with all the sizes and dates, etc.

dir>dir.txt
Last edited by RacoonRider on 2015-12-27, 05:20. Edited 1 time in total.

Reply 2 of 6, by inout

User metadata
Rank Newbie
Rank
Newbie

The problem's that program has several steps, in each user enters some information and program outputs some.

Reply 4 of 6, by RacoonRider

User metadata
Rank Oldbie
Rank
Oldbie

Can you use input parameters so that you can call the program from a batch, something like this? If you are the author of the program, this should not be hard.

format C: /FS: /V: /Q /A: /C /X

Reply 5 of 6, by inout

User metadata
Rank Newbie
Rank
Newbie

No, parameters cannot be entered from command line

Reply 6 of 6, by inout

User metadata
Rank Newbie
Rank
Newbie

Thank you very much for your answers!
I've decided problem via hooking mem_writeb and passing input to KEYBOARD_AddKey)