mIRC Home    About    Download    Register    News    Help

Print Thread
#69088 23/01/04 10:39 PM
J
Johnsie
Johnsie
J
Greetings all,

I'm trying to find out if I can get mIRC to input text from the output of a command-line driven executable. I can use /RUN to control the program with no problem, but I'd like to capture its input for further analyzation by mIRC. I didn't find any documentation stating if this can be done, so I'm curious if anyone has tried this at all?

I can provide more specific details, if interested.

Thank you,

John

#69089 24/01/04 04:56 AM
I
Iori
Iori
I
If you can redirect the output to a file (app.exe > file.txt), you could parse the file after execution. Apart from that mIRC doesn't have a way of grabbing the info from a command prompt.

#69090 24/01/04 12:56 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
AFAIK it can't be done directly. Perhaps this would be good as a Feature Suggestion. Something like -v/b switches for /run to indicate a supplied variable/binvar respectively to fill with the output.

#69091 24/01/04 06:11 PM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
I seem to remember doing something of the sort using $com (and perhaps the new $comcall!) and Windows Scripting Host (I believe it was). You might even find something about that on these forums in another article. wink

#69092 24/01/04 06:39 PM
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
There are two advantages of using WSH's Run method: you can delay the script until the program finishes, and you can control the window attribute (hidden, min/maximized etc). But you can't retrieve the program's output during or after the execution in this way.

There's a Standard Input/Output Interface DLL made by DragonZap that allows mIRC to receive a program's output and analyze it before sending further inputs. Although this DLL is somewhat outdated it can still become useful.

#69093 24/01/04 10:40 PM
I
Iori
Iori
I
Well thats what I was getting at in my post. If the output can be piped to file you can access it as soon as the com connection is closed. As yet OP didn't say that was an option.

#69094 25/01/04 09:48 PM
J
Johnsie
Johnsie
J
Greetings,

Thanks for your support so far! Everyone here seems to have a different idea -- all of which look good. I'll have to experiment with this program and let everyone know how the results come out.

Regards,

John


Link Copied to Clipboard