473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

'Faking' input to QBasic program with VB .NET 2005 application

All -

I was asked to work on a project converting some weather data. The
program used to convert the data is written in Quick Basic. I am only a
novice programmer and while I can see from the .BAS file what is
happening, I don't have the time bandwidth to rewrite the program in VB
..NET and I'm not sure it would do a proper conversion even if I did.

The compiled QB program asks for three inputs... 1) source file
location (string), 2) interval for averaging (int) and 3) output
location (string).

My question for anyone with Quick Basic experience is this - is there a
way to 'fake' this user input so that I could call the old QB program
from and 'pass' the input parameters programmatically such that the QB
program will think I'm manually responding to the prompts??

Many thanks in advance -
Danielle

Jan 18 '07 #1
7 1694
Well there is a challenge one doesn't hear ever day :-) QBasic...

I don't know if you can redirect the input (possibly) but a couple of
options come to mind. One is to contact the folks here:
http://www.qbasic.com/. The other is to add a few lines of code to the QB
program to accepts the inputs on the command line and to comment out the
spot where it currently requests input. You should be able to run the
program from your dotnet program and supply the values it wants on the
command line.

One other thing you could do with reasonably few changes is have the the QB
program read a text file to obtain the answers it needs (there are only 3
inputs.) The dotnet program would generate the "inputs.txt" file and run
the QB program which would read that file instead of prompting for the
answers.

In any case you might check with folks at that website.
Tom

"Danielle" <wx****@aol.comwrote in message
news:11*********************@v45g2000cwv.googlegro ups.com...
All -

I was asked to work on a project converting some weather data. The
program used to convert the data is written in Quick Basic. I am only a
novice programmer and while I can see from the .BAS file what is
happening, I don't have the time bandwidth to rewrite the program in VB
.NET and I'm not sure it would do a proper conversion even if I did.

The compiled QB program asks for three inputs... 1) source file
location (string), 2) interval for averaging (int) and 3) output
location (string).

My question for anyone with Quick Basic experience is this - is there a
way to 'fake' this user input so that I could call the old QB program
from and 'pass' the input parameters programmatically such that the QB
program will think I'm manually responding to the prompts??

Many thanks in advance -
Danielle

Jan 18 '07 #2
Tom,

I did want to write something the same, this if you ask yourself if you
should have done that. I am often in doubt after that I have given this kind
of answers.

Cor
Jan 18 '07 #3

To help you on your way the inputs on the command line = command$ ( the
parameters that you give while starting the program )
In my opinion this proggy could be verry easy rewritten in VB.Net or is it a
hughe code file ?
regards

Michel
"Cor Ligthert [MVP]" <no************@planet.nlschreef in bericht
news:ep*************@TK2MSFTNGP06.phx.gbl...
Tom,

I did want to write something the same, this if you ask yourself if you
should have done that. I am often in doubt after that I have given this
kind of answers.

Cor

Jan 18 '07 #4
Michel Posseth [MCP] wrote:
To help you on your way the inputs on the command line = command$ ( the
parameters that you give while starting the program )
In my opinion this proggy could be verry easy rewritten in VB.Net or is it a
hughe code file ?

I agree with Michel that re-writing the program in VB.net should not be
too difficult however, if you don't want to do that, you can use the
Process class in .Net and re-direct the standard input and output to
your vb.Net program. Then you can supply the necessary information as
the program prompts for it. This assumes that the QBasic program uses
standard input and output.

Jan 18 '07 #5
Thanks to all for the very helpful suggestions. I will look into the
Process class, but suspect that the Command$ input may be the way I go.
Thanks again!
Danielle

Jan 18 '07 #6
To answer the questin about how easy it would be to rewrite - it's a
small program but the data it works on is very specific and also stored
in some sort of wacky format. I don't feel confident that I can get the
output I need, while I am sure that the old qbasic program will out put
the right stuff. So, I think the command line suggestion is in first
place now...

Danielle

Jan 19 '07 #7
One might also look into the SendKeys method...

"Danielle" <wx****@aol.comwrote in message
news:11**********************@11g2000cwr.googlegro ups.com...
To answer the questin about how easy it would be to rewrite - it's a
small program but the data it works on is very specific and also stored
in some sort of wacky format. I don't feel confident that I can get the
output I need, while I am sure that the old qbasic program will out put
the right stuff. So, I think the command line suggestion is in first
place now...

Danielle

Jan 19 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: jas | last post by:
I have a basic client/server socket situation setup....where the server accepts a connection and then waits for commands. On the client side, I create a socket, connect to the server...then I...
3
by: | last post by:
I am working on a web/webservice application that has a service layer. Most service methods will perform an access-check before executing. This check uses the IPrincipal credentials available in...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
1
by: tiddwaylll | last post by:
Hi, I have a huge program written in old BASIC. In fact I don't really know what flavour its written in, looks like qbasic I think. I don't need to know what the program does, I just need to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.