Working on a startup File (like a shortcut with special functions) for a game. (Counter-Strike Global Offensive)
The intention is to replace the menu music - some updates ago this was easier but right now I need to forging on a Batch file.
This is how it looks so far
@Echo off
"C:\Users\Cedo\Desktop\csgo\csgo\Counter-Strike Global Offensive.url"
Timeout 9
"C:\Users\Cedo\Desktop\csgo\csgo\csgomusic.m3u8"
[Timeout 240]!
[Taskkill /IM winamp.exe]! ----> Dont work!
Exit
and the way to here is more complicated than I thought. I solved already a lot of problems because a lot of the stuff on the internet seems outdated I guess.
The actual problem is a second timeout and taskkill for the winamp music file. Strangely when inserting a second timeout (like the first) nothing happens. Just after closing winamp manually the Timer starts!
But something needs to be done so that the second timeout with 240 secs and the taskkill to close winamp automatically works.
Another cool thing would be to start the winamp music file a bit later without minimizing the started game window. (Already tried start /min commands - it doesn't matter actually - wont work if minimized or maximized) Does someone know more? Right now I'm good with 9 Seconds(winamp opens before the game maximizes because this takes some time and so i didn`t get tabbed out).
And is there maybe a better way to build this up or improve things?
Given this statement I infer that
"C:\Users\Cedo\Desktop\csgo\csgo\csgomusic.m3u8"
is starting Winamp.Note place the following script into the "C:\Users\Cedo\Desktop\csgo\csgo\" folder, or update the "_RootFolder" to have the correct path.
So essentially what you need to do is this:
Start a separate command window to run the task to kill winamp, because otherwise you will only move on tot the next command when Winamp is killed manually.