mIRC Home    About    Download    Register    News    Help

Print Thread
running a .bat file from mIRC. #145744 27/03/06 03:32 PM
Joined: Mar 2006
Posts: 4
T
Twinked Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Mar 2006
Posts: 4
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?

Re: running a .bat file from mIRC. #145745 27/03/06 03:37 PM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
/run "path\file" ?

Re: running a .bat file from mIRC. #145746 27/03/06 05:50 PM
Joined: Mar 2006
Posts: 4
T
Twinked Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Mar 2006
Posts: 4
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..

Re: running a .bat file from mIRC. #145747 27/03/06 06:20 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Try including the -p switch in /run, ie /run -p "path to\file"


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: running a .bat file from mIRC. #145748 27/03/06 09:01 PM
Joined: Mar 2006
Posts: 4
T
Twinked Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Mar 2006
Posts: 4
thanks!!

That did the trick PERFECTLY!


Btw - what did the -p do??

Re: running a .bat file from mIRC. #145749 27/03/06 09:05 PM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
It sets the working path to the path of the file you're running.

Re: running a .bat file from mIRC. #145750 28/03/06 12:19 PM
Joined: Mar 2006
Posts: 4
T
Twinked Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Mar 2006
Posts: 4
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

Re: running a .bat file from mIRC. #145751 28/03/06 12:56 PM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
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.

Last edited by mIRCManiac; 28/03/06 01:08 PM.