mIRC Home    About    Download    Register    News    Help

Print Thread
#6143 11/01/03 07:39 PM
Joined: Jan 2003
Posts: 3
M
MadMind Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jan 2003
Posts: 3
The /run program is useless if you want to get the output of a command line program and anything can't be done. I tried all posible and imposible variants.
It would be a good feature to get the output of command-line programs, not just using windows (DDE or DLL)

#6144 11/01/03 09:10 PM
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
Maybe becouse /run is made for running a program, not getting it's output? smile

#6145 11/01/03 10:51 PM
Joined: Dec 2002
Posts: 33
Ameglian cow
Offline
Ameglian cow
Joined: Dec 2002
Posts: 33
Create a batch file. Eg
Code:
@echo off
someprogram.exe > output.txt

Results are in the output.txt
Your script should create the batch file if needed

#6146 13/01/03 06:44 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
/run terminates as soon as the program starts, if you have to wait for output it means mIRC will freeze until the child program terminates. This means that in theory mIRC could freeze indefinately if a program never terminates. Not a very good thing...

#6147 14/01/03 01:33 AM
Joined: Dec 2002
Posts: 33
Ameglian cow
Offline
Ameglian cow
Joined: Dec 2002
Posts: 33
mIRC has never froze on me doing that. I use this method regularly, eg running user requested port scans via running nmap and returning the results. The scans could take hours and mirc keeps running along.
A test would be to type /run cmd.exe or /run command.com depending on your os. mirc should keep going while the command window is open.

#6148 14/01/03 07:07 AM
Joined: Dec 2002
Posts: 89
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2002
Posts: 89
There was stdio.dll by DragonZap.


Sincerely,
Necroman, #mIRC @ Undernet
#6149 14/01/03 08:23 PM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
just a misscommunication, you and codemaster are both correct. code was pointing out the condition where mirc has to wait for return output from a program, your method puts that task on the operating system instead of on mIRC.

in other examples where mirc is scaning, thats multipal processes one after anouther that continue to execute .. a loop .. its not a single task that can not move forward untill it gets output from anouther aplication or the user.

this is why mIRC does not alow you to use $$?="" in remotes because htat remote would then be paused untill the user inputed something, .. and considering sometimes i and many others can leave mirc runing for weeks on end being at the computer only off and on .. if your not there .. that means mirc would have to wait for u to return and inut somethign before it could move on.

however if mIRC was multithreded it would enable it to have a feature were it could posibly get return output from /run

Cobra^

#6150 16/01/03 03:23 PM
Joined: Jan 2003
Posts: 3
M
MadMind Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Jan 2003
Posts: 3
Running batch files and then read from files is not a very good solution, but using stdio.dll by DragonZap I think is better,
at least this is my opinion .)
I tried to run sime php scripts, it worked great.
But I think this should be made as a standart function in mIRC

#6151 27/01/03 12:57 PM
Joined: Dec 2002
Posts: 5
B
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
B
Joined: Dec 2002
Posts: 5
Just an alternative to a batch file, you could use...

/run command /c ping www.mirc.com > ping.txt

And if you wanted to read the information as it was being put into the file, you could set up a simple script that checked a file for new text from the last time it was checked, using say a counter for how many lines there were in the output file the last time, compared to how many lines there are now, etc.


Link Copied to Clipboard