What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Capture output of launched external application?

Capture output of launched external application?
Author: Message:
V@no
Full Member
***

Avatar
sexy

Posts: 162
Joined: Mar 2004
O.P. RE: Capture output of launched external application?
I found a work around this...I'm using "open" instead of "exec", that allowes to run hidden command prompt window.
then I created a myprogram.bat file where I set command line to execute my program and redirect output into a file:
code:
C:\myprogram.exe > C:\output.txt
and finaly I read the output file in the script.

Somebody might find this is useful, here is the script code:
code:
var outputfile = "C:\\output.txt";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var Shell = new ActiveXObject('WScript.Shell');
var oExec = Shell.Run("C:\\myprogram.bat", 0, true);
var output = "";
if(fso.FileExists(outputfile))
  output = fso.OpenTextFile(outputfile, 1, true, 0).fH.ReadAll();

12-05-2006 03:17 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Capture output of launched external application? - by V@no on 12-03-2006 at 09:07 AM
RE: Capture output of launched external application? - by Eljay on 12-03-2006 at 09:13 AM
RE: Capture output of launched external application? - by V@no on 12-03-2006 at 09:59 AM
RE: Capture output of launched external application? - by Spunky on 12-03-2006 at 01:59 PM
RE: Capture output of launched external application? - by V@no on 12-04-2006 at 02:12 AM
RE: Capture output of launched external application? - by V@no on 12-05-2006 at 03:17 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On