473,407 Members | 2,546 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,407 software developers and data experts.

Developing IDE for TASM. How to work with batch files using vb6.0?

I am a graduating college student. We have been developing an IDE for the turbo assembler as our thesis. Everything works out just fine in the text editor and other components of the IDE. But we encountered a problem in calling batch files. We decided to use a batch file to display the output. the batch file contains the following:

tasm sample
tlink sample
sample

first problem we encountered is that we can call the batch file but it does not display the command prompt window.

Second problem that i think of is that the batch file automatically terminates right after the last code is done. Is there a way to prolong the command prompt window, for example, ask the user when to close the window or the statement "press enter to continue"

it would be a big help if you can show me how to work with batch files, it would even be a bigger help if you can teach me other ways to display the output window for our IDE.
Jan 5 '11 #1

✓ answered by Guido Geurs

open the bat file with:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2.    Shell App.Path & "\" & "test.bat", vbMaximizedFocus
  3. End Sub
You can halt the run of the batfile with the command "pause" like:

Expand|Select|Wrap|Line Numbers
  1. REM list the files
  2. dir
  3. REM halt to see the results
  4. pause

5 2181
Guido Geurs
767 Expert 512MB
open the bat file with:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2.    Shell App.Path & "\" & "test.bat", vbMaximizedFocus
  3. End Sub
You can halt the run of the batfile with the command "pause" like:

Expand|Select|Wrap|Line Numbers
  1. REM list the files
  2. dir
  3. REM halt to see the results
  4. pause
Jan 5 '11 #2
Thanks. . .that's what I've been looking for, pause. . .hehe. . .
Jan 8 '11 #3
Now, is there a way that the only thing i can show are the results. my .bat file now contains this codes:

tasm sample
tlink sample
cls
sample
pause

and has a cmd output like this:

*****************************************

E:\NAPSTE~1\Thesis\TASMED~1\TASM>input
Hello World
E:\NAPSTE~1\Thesis\TASMED~1\TASM>pause
Press any key to continue . . .

*****************************************

Now, is there a way where the result would be like this:
**********************************
input
Hello World
pause
press any key to continue. . .
**********************************
or much better if the output would be
******************************
Hello World

Press any key to continue...
******************************

I'd like to kinda disregard in the output the path and the command. . .thanks again. . .
Jan 8 '11 #4
Guido Geurs
767 Expert 512MB
The @ suppresses the showing of the command in the line of code.
The "echo off" suppresses it for the hole batfile.
It can be set on again by "echo on".
So if we want to see only the results, even not the first
"echo off" ,it must start with "@echo off" .
Just place in the beginning of the bat file the command:

Expand|Select|Wrap|Line Numbers
  1. @echo off
like:

Expand|Select|Wrap|Line Numbers
  1. @echo off
  2. REM list the files
  3. dir
  4. REM halt to see the results
  5. pause
And You will only see the results= the folders and files in the directory.
Jan 9 '11 #5
Everything you said worked, thanks. . .now i'm thinking of a way how to edit my .bat file using richtextbox, . .hehe
Jan 13 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Steve Jorgensen | last post by:
I remember that I used to set up utility batch files, and create Windows shortcuts to them that would ask the user for parameters to supply to the batch files. From what I can tell, this...
6
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
1
by: Charles | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
1
by: Sreelu | last post by:
Hi One of my applications need to upload some data to some secured sites, using SFTP. This is to be done dynamically. So I'm creating a batch file on the fly and calling a script file(.txt), using...
2
by: Stephen | last post by:
Hi all, I want to create an app that runs a batch file which inturn runs applications. question: if I start the batch file from app1, how can app1 know that the batch file ran successfully...
2
by: dvk | last post by:
Hai, Can anybody pls tell me how to execute a batch file (which is in network shared folder)?
12
by: Raghunandan24 | last post by:
Hi, I wanted to know how to run dos commands using javascript. Also i need to run a batch file with two command line arguments. These commandline arguments are variables. Thanks Raghu
1
by: Raghunandan24 | last post by:
Hi, I would like to know how to pass arguments to a batch file using vb script. I am able to run the batch file using wshShell.Run. I am up against a wall here... Dim WshShell Set WshShell...
1
by: kiranasileti | last post by:
Hi All, I need to run couple of batch files using the C# console application. I have implemented the following code. ProcessStartInfo psi = new ProcessStartInfo ( ); psi.WindowStyle...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.