Let me be honest, i'm not that good at programming. But i what I like about it is to make things easier. And i'm trying to make a .bat file to open both League of Legends, Autohotkey (for changing songs ingame) and winamp at the same time, but the tricky part is too make sure they don't do anything if it's already running. I investigated it a bit on this site, but didn't find something specific for my needs. But i tried to make a .bat file, with the information i gathered, ran it, but it opens the programs although they're already running. Since i'm new to this, i'm guessing one of the problems is the several different startservices (or maybe you can't name it like :autohotkey), the program name (fx find "LoLLauncher", in process lists it's called LoLLauncher.exe *32) and maybe other problems. This would make my gaming easier if you would tell me if i'm right about my troubleshooting.
I would really appreciate it if you would have a look at it
Update: Forgot to write my system info:
Windows 7 Ultimate 64 bit
Another update: What i really want is just a shortcut that can do this, if you have a better/easier suggestion please share.
I would really appreciate it if you would have a look at it
Update: Forgot to write my system info:
Windows 7 Ultimate 64 bit
Another update: What i really want is just a shortcut that can do this, if you have a better/easier suggestion please share.
Code:
@echo off
net start | find "LoLLauncher" > nul 2>&1
if not .%errorlevel%.==.0. goto startservice1
goto autohotkey
:startservice1
start "" "C:\Program Files (x86)\League of Legends\lol.launcher.exe"
:autohotkey
net start | find "AutoHotkey" > nul 2>&1
if not .%errorlevel%.==.0. goto startservice2
goto winamp
:startservice2
start "" "C:\Program Files\AutoHotkey\AutoHotkey.exe"
:winamp
net start | find "winamp" > nul 2>&1
if not .%errorlevel%.==.0. goto startservice3
goto skip
:startservice3
start "" "C:\Program Files (x86)\Winamp\winamp.exe""
:skip
exit