Originally posted by ~*McoreD*~@Feb 20 2004, 05:05 AM
I still believe the required code is the same as before. 
If System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
Dim strServerAddress As String
strServerAddress = System.Windows.Forms.Clipboard.GetDataObject.GetData(System.Windows.Forms.DataFormats.Text)
Try
Dim strFile As Stream = File.Open(Application.StartupPath + "\" + strServerAddress + ".bat", FileMode.Create, FileAccess.Write)
Dim sw As StreamWriter
sw = New StreamWriter(strFile)
sw.WriteLine("@echo OFF")
sw.WriteLine("cd " + IO.Path.GetDirectoryName(txtMinimizer.Text))
sw.WriteLine("Start /MIN " + IO.Path.GetFileName(txtMinimizer.Text))
sw.WriteLine("CHOICE.COM /N /CY /TY,4 >NUL")
sw.WriteLine("cd " + txtQ3A.Text)
sw.WriteLine("Start /w quake3.exe +set fs_game q3ut3 +nosplash +set com_hunkmegs 128 +com_zoneMegs 32 +com_soundmegs 32 +connect " + strServerAddress + " /prefetch:1")
sw.WriteLine("cd " + IO.Path.GetDirectoryName(txtMinimizer.Text))
sw.WriteLine("process -q " + IO.Path.GetFileName(txtMinimizer.Text))
sw.WriteLine("cls")
sw.Close()
Catch ex As Exception
Dim strMsg As String = MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1)
If strMsg = DialogResult.Retry Then
btnCreate_Click(sender, e)
End If
End Try
End If
This will take the Clipboard content as a string called strServerAddress
It will be added to the place you wanted in the bat file
And it will be saved as StrServerAddress.bat e.g. 192.168.0.1.bat
Sorry if I failed this time too.
Um very interesting. I'm still learning so if i sould lost or just way off then. lol
Anyways this part:
sw.WriteLine("Start /w quake3.exe +set fs_game q3ut3 +nosplash +set com_hunkmegs 128 +com_zoneMegs 32 +com_soundmegs 32 +connect " + strServerAddress + " /prefetch:1")
Those are just my settings. I need it so the user can do there ony setting.
Like in the program above u made that would be sweet if the user could add there options.
Or just have u know three options for hunmegs, zonemegs and soundmegs.
Something like that.
But damn man I really really appricate your help on this. Your a god.
Of and if your wondering i only have Microsoft Visual Studio 6.0 Corp. at the moment.
__________________
Ad Muncher Usage Statistics for v4.7 Build 27105/1624
Adverts removed by Ad Muncher: 1,601,933
Approximate bandwidth saved: 12,515 MB
Counter started: April 2, 2003
Download:
http://war59312.admuncher.com/download.shtml