
Originally Posted by
ShadowSpartan
If you don't know what you are doing, and you are just copying and pasting code that you find on the Internet, you should not be attempting this. Instead, do some actual research about how to go about doing something like this, as well as actually learning the language.

Originally Posted by
Con
On the topic at hand, you would be better off learning more of VB first rather than trying to learn it while you program.
Your point makes perfect sence, I would probablly think the same thing if I was a well practiced programer and somebody in a similar siutuation to mine right now asked me for help.
Although I don't really know much VB I'm not as far out of my depth as I may appear, as I have studied programing (Java (only command line though) and Delphi) before, just not to this kind of level. I chose to use VB for this as it is what we're using in the programing module of HND Computing this year so I thought this tool++ project might be a good bit of practice.

Originally Posted by
ShadowSpartan
I should have mentioned that I can speak from experience on this matter. This is where I made a mistake when I first started programming Halo related projects. I dived right into the script extractor as my first project, and while I did get it to work properly, the code is such an eyesore to look at. I have since rewrote it about two times.
Another thing you don't want to do is just jump right into writing code, it causes you to create not well thought out, and thus sloppy code. I've moved onto C#, and have been writing an app for a couple months now, and I can't tell you how much planning it out and not jumping right into coding has helped me. While your project is rather "small" in comparison, the same principles still apply.
That sounds like sound advice. I shouldn't really be rushing in like this, but I can't resist playing around with programing. I've actually understood most of what I'm doing (and grabbing off the internet) in this tool++ project, just not the more hardcore stuff that actually interfaces with the command line app. Here's the function (from the internet) that does the interfacing (probbablly over 90% of the stuff I don't understand well.) Despite not understanding it at all well, I still managed (with a little more hunting on the internet) to make a few modifications (mostly to get it to compile in the version of VB I'm using).
Code:
PrivateFunction GetDosOutput(ByVal strCMD AsString) AsString'Function from the internet (http://www.vbcity.com/forums/topic.asp?tid=36383&#RID108842) to allow command line interaction
GetDosOutput = ""
Dim objShell As IWshRuntimeLibrary.WshShell
Dim objExec As IWshRuntimeLibrary.WshExec
Dim strLine AsString
Dim strPrompt AsString
'set the prompt to look for
strPrompt = "choice (1-9):"
'instatiate Shell object
objShell = CreateObject("WScript.Shell")
'Execute the dos command
objExec = objShell.Exec(strCMD)
'wait for execution to finish
DoWhile objExec.Status = IWshRuntimeLibrary.WshExecStatus.WshRunning
Application.DoEvents()
'get respone 1 char at a time
strLine = objExec.StdOut.Read(1)
If strLine <> ""Then
'append the char to the output
GetDosOutput = GetDosOutput & strLine
'my next modification
If GetDosOutput.IndexOf(strPrompt) <> -1 Then
MessageBox.Show("choose a type for the shader") 'temporay modification to show me if it's found the line, which at the moment it doesn't seem to be doing
'objExec.StdIn.Write("1")
EndIf
'if the last part of the output is the prompt, write something to stdIn (input)
If Microsoft.VisualBasic.Right(GetDosOutput, Len(strPrompt)) = strPrompt Then
MessageBox.Show("Toolbeta") 'temporary message, so I can see if the IF statment has been entered
objExec.StdIn.Write("1")
EndIf
EndIf
If objExec.StdOut.AtEndOfStream Then
ExitDo
EndIf
Loop
'get the rest of the standard out
GetDosOutput = GetDosOutput & objExec.StdOut.ReadAll
'get any standard err. output
GetDosOutput = GetDosOutput & objExec.StdErr.ReadAll
'clean up
objShell = Nothing
objExec = Nothing
EndFunction
I'm not expecting to recive any help, but I put this up just in case.

Originally Posted by
ShadowSpartan
I don't see the point of using a GUI for Tool. It's not hard to use Tool in it's current state, but that's just my opinion.

Originally Posted by
Con
I don't see the point either, tool really isn't all that hard to use.
I think I can see what you mean here as well, when the tool++ shader choice issue comes up I switch to normal command line tool myself and once you've found out you have to copy cmd.exe to the halo ce folder it's not too hard. I just find tool++ faster scine I'm not very good at remembering the tool commands for the original command line version so it takes me two or three guesses before I get it to compile my stuff.
Bookmarks