file making [Archive] - SpeedGuide.net Broadband Community

View Full Version : file making


Jacko_R
06-15-02, 09:43 AM
hi guys i want to make a bat file more r less because i want to use it when the game lanuchs i want the bat file to run is there a way to make it run when the game runs? also can i make it only run after say 20secs ? e.g put a delay on it before it run help would be great thanx o and what i want to put in it is a few files that i want to run. Theres a checker in a game thats checks for modifactions to files so i want o make a bat file to run after it checks e.g it checks within the first few sec of lanuchs of the game i want bat file to run after it checks

parse27
06-20-02, 02:04 PM
have you ever tried programming in visual basic? using vb you can write a program that detects an instance of an application so you can detect the loading of the game. vb also has a timer function so you can time the launch of your bat file.:nod:

Mentatope
06-30-02, 07:55 PM
lets say, i dont have the money for the program of visual basic, any way i could get a free copy? or a different program that was free?
:confused: :rotfl:

FunK
07-01-02, 07:15 PM
I'll have an answer soon...

FunK
07-01-02, 07:46 PM
I found a way to do what you want with a bat file:

I'm going to guess that you have a working knowledge of DOS and understand the directory structure.

This would be handly for launching a program X number of seconds after you launch the first program. This WILL NOT check to see if that program is open and THEN launch it.

What you would do is create a shortcut to this instead of launching your game through the regular means (or just modifying your original shortcut to this script).


@ECHO On

// Depending on where the bat file is, you want to get to the root directory.
// Eg File is located at C:\My Documents\RTCW.bat
// the "cd ..:" moves up one level. we do this twice to get to C:\

cd ..
cd ..

// After getting to the root directory we change directories to the dir
// housing the game. For Example C:\RTCW\


cd C:\RTCW


// We then use "start" to launch the exe.


start WolfMP.exe


// This is where you set your TIME to WAIT.
// This is the amount of time the batch file waits until executing the next line.


TIMEOUT 30


// Now we set the PATH to the next program we want to launch
// In this case, I'll use TeamSpeak as an example.

Path=C:\Program Files\TeamSpeak

// Now we just run the Teamspeak program as before.


start teamspeak.exe



the whole thing looks like this (modify to your needs)

@ECHO On
cd ..
cd ..
cd C:\RTCW
start WolfMP.exe
TIMEOUT 30
Path=C:\Program Files\TeamSpeak
start teamspeak.exe


That should get you on the right track. There may be another way, but this one works for me. I'm on Win2k. It's easier than looking to see if a program is running. This way you know that both programs will be launched as needed.
After you modify the script to the programs you need to run, you should be able to do what you want. Just remember to use the batch file when starting your game.

FunK