What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help Executing External App

Help Executing External App
Author: Message:
cirix
New Member
*


Posts: 10
Joined: Jun 2006
O.P. Help Executing External App

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.
06-26-2006 07:21 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help Executing External App
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 \
06-26-2006 07:42 PM
Profile E-Mail PM Find Quote Report
cirix
New Member
*


Posts: 10
Joined: Jun 2006
O.P. RE: Help Executing External App
Thak you verry much,  it worked perfectly.
06-28-2006 07:19 PM
Profile E-Mail PM Find Quote Report
kostis90gr
New Member
*

LOL

Posts: 2
34 / Male / –
Joined: Jul 2006
RE: Help Executing External App
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
07-30-2006 06:31 PM
Profile E-Mail PM Web Find Quote Report
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
35 / Male / –
Joined: Jun 2004
RE: Help Executing External App
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.
07-30-2006 08:19 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help Executing External App
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"
07-30-2006 08:39 PM
Profile E-Mail PM Find Quote Report
kostis90gr
New Member
*

LOL

Posts: 2
34 / Male / –
Joined: Jul 2006
RE: Help Executing External App
"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.
07-31-2006 07:40 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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