Writing a batch files which executes on closing firefox

Associate
Joined
16 Jun 2007
Posts
279
Location
mysterious archipelago
Hi i have currently written 2 batch files
one which starts firefox and closes utorrent and another which closes firefox and starts utorrent

I want to try to implement this into one process

Is there a way i can get a batch file or similar process so that which i close firefox manually(ie clicking the x button in the top right had corner) that i can execute a script that will start utorrent running.

Indoing this i would be able to control utorrent through just the opening and closing of firefox.

regards
whatalegend
 
you dont want 2 batches but just one.

and it should look something like this

Code:
@echo off
taskkill /f/im utorrent.exe
start /wait firefox.exe
start utorrent.exe
exit

Start and start /wait are the to important ones. Start on its own will start the program then continue on to the next line in the batch, Start /wait will wait for the program to exit before starting the next line of the batch.
 
Back
Top Bottom