BetaONE will rise again!


Reply
  #1  
Old 20th Feb 04, 10:05 AM
~*McoreD*~'s Avatar
~*McoreD*~ ~*McoreD*~ is offline
Super Moderator
 
Join Date: Jul 2002
Location: Australia
Posts: 2,902
~*McoreD*~ is an unknown quantity at this point
I still believe the required code is the same as before.

Code:
       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.
Reply With Quote
Reply


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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft launches the Project PC NewsBot BetaONE News 0 2nd Nov 04 02:00 PM


All times are GMT +1. The time now is 06:47 PM.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.