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.