BetaONE will rise again!


Reply
  #1  
Old 19th Feb 04, 04:51 AM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
Hey,

Anyone know hot to copy something from the clip board and enter it into a bat file some how. Like set it has a variable or something?

Thanks,
Will

Edit: Topic Title.
__________________
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
Reply With Quote
  #2  
Old 19th Feb 04, 07:13 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
Here is a sample VB6 Project.
Reply With Quote
  #3  
Old 19th Feb 04, 07:18 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
Here is VB.NET Code:

'Pasting from the Clipboard
Code:
               If System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent( _           System.Windows.Forms.DataFormats.Text) Then            txtURL.Text = System.Windows.Forms.Clipboard.GetDataObject.GetData( _            System.Windows.Forms.DataFormats.Text)        End If
'Writing to a File
Code:
      strBatFile = "war59312" FileOpen(1, (Application.StartupPath & "\LogonHours.bat"), OpenMode.Output) PrintLine(1, strBatFile) FileClose(1)
Cheers,
McoreD
Reply With Quote
  #4  
Old 19th Feb 04, 09:48 PM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
um ok cool

i understand that

but how the hell to do it automatic..write in the file i mean...

what i'm tyring to do is copy whats from the clipboard when the all seeing eye adds something to it and then at that to my script..understand the last part but of course than manually by running the program

and only when the all seeing eye adds something to the clipboard...the server address spicaficly... which is automaticaly copied to the clipboard when i join a server

i'm trying to make it so there is no user input needed...

u can see my other post for what i have so far

and it takes over the entire bat file it seems

thanks man,
will
__________________
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
Reply With Quote
  #5  
Old 20th Feb 04, 03:20 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
you mean getting the content from the clip board and write to *.bat file at once?

Code:
If System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent( _    System.Windows.Forms.DataFormats.Text) Then    Dim strBatfile as String     strBatfile = System.Windows.Forms.Clipboard.GetDataObject.GetData( _     System.Windows.Forms.DataFormats.Text) End If FileOpen(1, (Application.StartupPath & "\LogonHours.bat"), OpenMode.Output) PrintLine(1, strBatFile) FileClose(1)
Just have them all together in one Sub.
Reply With Quote
  #6  
Old 20th Feb 04, 04:53 AM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
I mean in my bat file. I want to have say a variable. And have the varible set to whats in the clipboard. Of course have a different bat file that does this.

Hope you know what I mean.

So like this:

@echo off
cd C:\Minimizer
Start /MIN Minimizer.exe
CHOICE.COM /N /CY /TY,4 >NUL
cd C:\Program Files\Quake III Arena
Start /w quake3.exe +set fs_game q3ut3 +nosplash +set com_hunkmegs 128 +com_zoneMegs 32 +com_soundmegs 32 +connect "Clipboard Varible Here" /prefetch:1
cd C:\Minimizer
process -q Minimizer.exe
cls

So where it says clipboard variable here. Thats were i want to what ever is in the clip board to be entered there.

But use a differtnt bat file to put it there.

So when I double click a server in the All Seeing Eye is runs my bat file but at the same time The All Seeing Eye atuomaticly puts the server address in the clip board and then my scripts takes that in the clipboroad and adds it to my other bat file and then runs that bat file.

See what i mean? So no user inveration at all. Besdies dulbe click the server name in the all seeing eye like normal.

Thanks,
Will
__________________
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
Reply With Quote
  #7  
Old 20th Feb 04, 10:45 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
Do you mean something like this ?
Reply With Quote
  #8  
Old 20th Feb 04, 11: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
  #9  
Old 20th Feb 04, 08:33 PM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
Quote:
Originally posted by ~*McoreD*~@Feb 20 2004, 04:45 AM
Do you mean something like this ?
um what excatly does this do?

make my script for you?

that would be sweet

and if you could make an installer mean it installs all the other needed files for u

that would be asome

thanks for all your help man

now goign to take a look at what you said below

um ok i see what it does now... lol...got ti working..just gives u that error if nothing in the clipboard but thats cool

um now its acting werid lol



oh ok wont do 207.44.182.28:27960 or something like that...

guess the : fs it up

The thing is i want the user to be able to choose this part of it:

Start /w quake3.exe +set fs_game q3ut3 +nosplash +set com_hunkmegs 128 +com_zoneMegs 32 +com_soundmegs 32 +connect Microsoft Visual Studio 6.0 /prefetch:1

Those were just my options.

oh and if possible i need it to creat the same bat file every time, like connect.bat or something because thats what the all seeing eye would be set to the entire time.

know what i mean? it needs to stay the same...

also one question the default directories look good..but does it automattically decet the folders or is it just set to that...

mean that would be cool if it actually tries to find it... u know so it u have it installed somewere

or u can just keep it the same..thats cool..anything is... since your doing all the hard work...

u the man....

and yea of course u get 100% full credit...

you are the man!!!

also i was thinking instead of it just creating the script it creates the script and then runs it

so then in the all seeing eye it connect to your app and the ip address of the server in the the clipboard

and then you just click say "Go!" and it creates the script and then runs it.

That would be pefect. Plus think most people would love to have a qui then command line.

but i would still like for it to just make the same bat file every time or you end up with a ton of them lol

or u chould just delete it afterwords i guess

oh and btw the connect part as too look like this to work...has to be in ""

+connect "ipaddress"

so yea it does not work right now

also do u know if there is a way to make all the dos windows hidden so u never see them?

and this dont even work for some reason Start /MIN Minimizer.exe mabye u know of a way...u know so u dont have to click ok every time.

thanks,
will
__________________
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
Reply With Quote
  #10  
Old 20th Feb 04, 08:37 PM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
Quote:
Originally posted by ~*McoreD*~@Feb 20 2004, 05:05 AM
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.
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
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 03:00 PM


All times are GMT +1. The time now is 09:59 AM.


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