What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Execute an .exe from the .plsc file

Pages: (2): « First « 1 [ 2 ] Last »
Execute an .exe from the .plsc file
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Execute an .exe from the .plsc file
quote:
Originally posted by ShawnZ
quote:
Originally posted by hadesz
Because I don't know how to talk with a driver in Java...

you mean javascript.

besides, my question was rhetorical. read: tell us what it does, and we'll help you rewrite it in javscript.
you mean JScript |-)
[Image: markee.png]
11-05-2007 10:31 AM
Profile PM Find Quote Report
hadesz
New Member
*


Posts: 10
Joined: Nov 2007
O.P. Undecided  RE: RE: Execute an .exe from the .plsc file
quote:
Originally posted by vikke
A simple function:
code:
function ExecuteFile(Name)
{
    var objShell = new ActiveXObject("Shell.Application");
    objShell.Run(MsgPlus.ScriptFilesPath + "\\" + Name + ".exe");
}

How to start LED_on.exe:
code:
ExecuteFile("LED_on");



Some problem, I copied your source, but don't working!

Error code: -2146827850
11-05-2007 11:46 AM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Execute an .exe from the .plsc file
That is probably because of the spaces in the string for the path. Instead try this:
code:
function ExecuteFile(Name)
{
    new ActiveXObject("WScript.Shell").Run("\""+MsgPlus.ScriptFilesPath + "\\" + Name + ".exe\"");
}

This post was edited on 11-05-2007 at 03:46 PM by markee.
[Image: markee.png]
11-05-2007 11:48 AM
Profile PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: RE: Execute an .exe from the .plsc file
Sorry, use the "ShellExecute" function instead of "Run". So it would be:
code:
objShell.ShellExecute(MsgPlus.ScriptFilesPath + "\\" + Name + ".exe");

This post was edited on 11-05-2007 at 04:04 PM by vikke.
11-05-2007 03:07 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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