Shoutbox

Help Executing External App - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Help Executing External App (/showthread.php?tid=61632)

Help Executing External App by cirix on 06-26-2006 at 07:21 PM


Hey I currently have an VB6 app and Im tring to implement the same feature to a Plus Live script but I cant get it to execute an external app in VB6 I have it like this:

Shell "C:\Program Files\Samurize\SamurizeServer.exe i=mcover c=msnc.ini trayiconvisible=0", vbNormalNoFocus

And then I close it using:

Shell "C:\Program Files\Samurize\SamurizeServer.exe i=mcover c=msnc.ini close", vbNormalNoFocus

How can I execute it under Jscrip for Plus Live?

Thank you.


RE: Help Executing External App by matty on 06-26-2006 at 07:42 PM

quote:
Originally posted by Leonardo
After further investigating in the MSDN library, I found I could do this:

code:

    var objShell = new ActiveXObject("Shell.Application");
    objShell.ShellExecute(MsgPlus.ScriptFilesPath + '\\file.chm', "", "", "open", 3);



Just make sure to use \\ instead of \
RE: Help Executing External App by cirix on 06-28-2006 at 07:19 PM

Thak you verry much,  it worked perfectly.


RE: Help Executing External App by kostis90gr on 07-30-2006 at 06:31 PM

I have a C++ console application which must take an argument to run properly.I wanna use MSN to make it run.I tried the "/run" command,the argument was passed to the program bt the program didb't run properly.I also tried using wat Matty posted with the difference of filling the 2nd argument of ShellExecute with the argument i want to pass to my program.Once again the argument was passed bt nothing happened.Keep in mind though that when i use cmd to run the application and pass the argument it works just fine


RE: Help Executing External App by Plik on 07-30-2006 at 08:19 PM

If your console application returns straight away, then you wont see anything because the program has executed, thus the window has closed. Thats why you only see it working fine in cmd.


RE: Help Executing External App by matty on 07-30-2006 at 08:39 PM

quote:
Originally posted by kostis90gr
I have a C++ console application which must take an argument to run properly.I wanna use MSN to make it run.I tried the "/run" command,the argument was passed to the program bt the program didb't run properly.I also tried using wat Matty posted with the difference of filling the 2nd argument of ShellExecute with the argument i want to pass to my program.Once again the argument was passed bt nothing happened.Keep in mind though that when i use cmd to run the application and pass the argument it works just fine

Couldn't you execute it like this?

code:
/run cmd /k "path to file"

RE: Help Executing External App by kostis90gr on 07-31-2006 at 07:40 AM

"If your console application returns straight away, then you wont see anything because the program has executed, thus the window has closed. Thats why you only see it working fine in cmd."

Actually its not supposed to do anything,it just operates with files so i dont need any output to the screen (except for debugging things).

And that /run cmd /k "path" didn't seem to help.Well,actually there is a strange problem with my application..When i modify it so it reads from the file and outputs its content to the screen,the value is correct!When i look into the .txt file with notepad though,i see that nothing has changed.I thought that my program may have created an ADS (Alternative Data Stream) file which is completely invisible to cmd and windows,but after searching with LADS (a program to locate these files),i found nothing. :S Anyway people,thx for your help,i found another way to do this.