[TC] Gaming Forums

Full Version: Create a BAT file to launch several programs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
As requested, I have made a small tutorial on how to make a simple .bat file which will launch several programs at the click of a shortcut.

1. Open a fresh Notepad file and save it in your LFS area, calling it something like "RunLFS.bat". Make sure you select the save as type as "All Files (*.*)" else this will not work.

This is an example of my RunLFS.bat file, make the adjustments to your specific needs! Smile

Code:
@echo off

start /d "C:\Program Files\Logitech Gaming Software" LCore.exe
start /d "C:\Program Files\Logitech\Gaming Software" LWEMon.exe
start /d "C:\Users\Ash\LFS" LFS.exe

As you can see, I have mine set to launch Logitech Profiler, Logitech Keyboard Profiler and LFS itself.

Explanation:

The other lines are the executables which I wish to launch. You can see there are 2 main parts. The file LOCATION and the EXECUTABLE itself. You need to have the LOCATION within the speech marks and the EXECUTABLE outside of them.

I then found the actual file itself which I saved in my LFS directory, and send it to the desktop as a shortcut and changed the icon to match LFS's own one.

[Image: 2hro95i.png]

[Image: 6sc8c2.png]
Hope this helps, if your stuck, reply and ill give you a hand! Smile - PS Remember to save your file when doing your changes!
Very nice tutorial, Ash. Thanks for posting!

This may sound like a dumb question, but can I use this method to connect to servers? Using the server IP as the location?
Here you go...

Replace
Quote:start /d "C:\Users\Ash\LFS" LFS.exe

with

Quote:@start lfs://join=[TC]%%20CityDriving%%20One
Thank you! Smile

There is a part which is a little confusing, does the .bat replace the original lfs.exe?
Noo the .bat file is pretty much a 'Shortcut'. Keep the lfs.exe or you wont be able to play your game lol.

The .bat is simply a script which runs commands. Somewhat like LFS Scripts Smile
What about putting timer between programs cue to LFS Lazy puts insim automatically 29999 but Mary is saying error before it?
2 methods to make a timer, simply add one of these in the file :

1) The timeout command :

timeout /T 1 /nobreak

/T number = set time (in seconds)
/nobreak = ignore key press so it won't interrupt the timer if you press a key.

2) You can "make" a timer by pinging an invalid IP address :

ping 1.2.3.4 -n 1 -w 1000 >NUL

-n number = number of request to send (leave it to 1)
-w number = delay in milliseconds (1000 = 1 sec)
Can I make BAT file to press for example f7?
Thaks Val for response Smile
This thread is over my nerd level.

Might try this, need to start TurnsigV0.3, LFSlazy, LFSstrobe, etc stuff.
(2015-08-16 09:08)Otava Wrote: [ -> ]Can I make BAT file to press for example f7?
Thaks Val for response Smile

Do you want a .bat script which press the F7 key or do you want to execute a .bat file by pressing the F7 key ?
I said to, not by Smile But now the problem is solved and I dont need to so Thanks for response Smile
One thing still, can I make LFS Strobe to load the settings automatically
Uuuh, that took me a long time.
If anybody wants a files what I use to start now just PM me or post here, it puts port automatically (needs 1 bind slot) and starts LFS and/or TC, LFSLazy, Mary and LFSStrobe with settings
I use a .bat-file to start LFS and other programs like Mary for months. It's worth it, because i can start everything with one file now!
Or just use autoexec.lfs script.

/insim 29999

/exec Mary.exe
/exec LFSLazy.exe

Edit: Hmm I see. You guys are a next level nerdy. Smile
@virtualtourist, i use that in combination with a .bat-file that makes a back-up of the message-log of the last session.
Sharing how I use this
Main batch
LFS-TC.bat Wrote:@echo off

@start lfs://join=[TC]%%20CityDriving%%20One
ping 1.2.3.4 -n 1 -w 3000 >NUL
start /min /d "C:\Users\Onni\Desktop\Pelit\LFS\LFS Shortcut" F7.vbs
ping 1.2.3.4 -n 1 -w 1500 >NUL
start /min /d "C:\Users\Onni\Desktop\Pelit\LFS\" LFSLazy
start "" /min "C:\Users\Onni\Desktop\Pelit\LFS\LFS Strobe\LfsStrobe.exe" "C:\Users\Onni\Desktop\Pelit\LFS\LFS Strobe\Yea.txt"
start /min /d "C:\Users\Onni\Desktop\Pelit\LFS\Mary\Mary" Mary
and the "F7.vbs"
F7.vbs Wrote:Set oShell = CreateObject("WScript.Shell")
oShell.AppActivate "Live For Speed"
oShell.SendKeys "^{F7}"
Hopefully someone found this useful
I use .bat-files and LFS Scripts for about a half year, and it's worth the pain!
So I had this for quite a while now, but my question is, how to turn this off?, my LFS Lazy is broken so it won't connect to port 29999, and I want to change this, but I can't find the .bat file I made like a year ago..

Here is a screenshot of my LFS folder.

[Image: 27f62ba3d1.png]

Thanks in advance.
(2016-01-10 22:38)HellaFlush Wrote: [ -> ]So I had this for quite a while now, but my question is, how to turn this off?, my LFS Lazy is broken so it won't connect to port 29999, and I want to change this, but I can't find the .bat file I made like a year ago..

Here is a screenshot of my LFS folder.

[Image: 27f62ba3d1.png]

Thanks in advance.

Well you use the .bat file to launch LFS right? If its a shortcut, right click it and find the destination area through the properties.
Pages: 1 2
Reference URL's