Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 21st, 2005, 3:11 PM   #1
Limpet
Newbie
 
Join Date: Feb 2005
Posts: 2
Rep Power: 0 Limpet is on a distinguished road
best method of starting another program?

Hi, im new here and I have a question.

I'm trying to make a gui in vb6 that will pass parameters to an external program. I've read that you can do that it can be done with Shell(), ShellExecute() or ShellExecuteEx() but I don't know which way would be best to do this. Maybe there's a better way than those?

The programs (there's 3) that I am trying to send these parameters to are called vbsp.exe, vvis.exe, and vrad.exe. If anyone plays hl2 and maps for it you'd recognize these programs. What they do is build the level and compile it into a .bsp file that you play the game with.
Anyway, the way you run these programs is like this: (I'll use vbsp.exe for the example)

vbsp [options...] mapfile

Where [options] are the parameters and mapfile is a .vmf file.
Which way is would be best to run the program and give it the parameters a user would select?

Thanks for anyhelp.
Limpet is offline   Reply With Quote
Old Feb 21st, 2005, 4:49 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
IIRC, Shell will do you fine. If it doesn't, try ShellExecute.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 21st, 2005, 7:02 PM   #3
Limpet
Newbie
 
Join Date: Feb 2005
Posts: 2
Rep Power: 0 Limpet is on a distinguished road
Ok I will try that.
Thank you
Limpet is offline   Reply With Quote
Old Mar 2nd, 2005, 4:26 PM   #4
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
To the best of my knowledge the mesh files need to be passed through StdIn rather than as command line parameters - that's what the console thing on the Valve Hammer editor (haven't used it for ages!) does - if not your BSP file may not be fully optimised and may get artefacts (holes, low-res lighting etc).
You can do this from cmd (just use the ">" directive) and in VB the simplest way is to use the FileSystemObject, though there are API alternatives.
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC