mIRC Homepage
Posted By: Twinked running a .bat file from mIRC. - 27/03/06 03:32 PM
Heres my plan:

I have a werewolf game script that runs in java (.bat)..
It is all set up and fully works.

I need a scrpt that works like this:

Somebody types a command. This command triggers a script which loads the bot.

I will then have a line in the scipt that kills the bot when it says the final line of the game (this bit is allready sorted)

My problem is: i cannot remember, or find, the command which can run other files through mIRC..

Any help?
Posted By: mIRCManiac Re: running a .bat file from mIRC. - 27/03/06 03:37 PM
/run "path\file" ?
Posted By: Twinked Re: running a .bat file from mIRC. - 27/03/06 05:50 PM
Tried that.. i get the error:
"could not find the main class. Program will exit"

If i manualy run the exact same location.. it works perfectly..
Posted By: qwerty Re: running a .bat file from mIRC. - 27/03/06 06:20 PM
Try including the -p switch in /run, ie /run -p "path to\file"
Posted By: Twinked Re: running a .bat file from mIRC. - 27/03/06 09:01 PM
thanks!!

That did the trick PERFECTLY!


Btw - what did the -p do??
Posted By: mIRCManiac Re: running a .bat file from mIRC. - 27/03/06 09:05 PM
It sets the working path to the path of the file you're running.
Posted By: Twinked Re: running a .bat file from mIRC. - 28/03/06 12:19 PM
ive now ran into a toaly seporate prpblem.. heres the command i used:

on *:TEXT:!startsol*:#solersunited:{
/run -p C:\Documents and Settings\Twink\My Documents\Downloads\SoLbot/run.bat
}

Now.. how can i edit this to stop multiple programs being run?
Yesterday someone decided to tpe that command hundreds oftimes and crash my PC :-/

I need to prevent that :P
Posted By: mIRCManiac Re: running a .bat file from mIRC. - 28/03/06 12:56 PM
Quote:
I need to prevent that


Then don't do that :tongue:

If the batch file starts an application that continues running
as a process, someone on here (can't recall who) made an
alias called isprocess that you could call as an identifier
and supply it with the file name of the process, it would
return $true if the process existed. Do a search of these
forums for isprocess .. set the date range to 5 years.

~ Edit ~

Nevermind about the search, I searched for you smile
It was tidy_trax here it is.
© mIRC Discussion Forums