Shoutbox

Execute an .exe from the .plsc file - 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: Execute an .exe from the .plsc file (/showthread.php?tid=78736)

Execute an .exe from the .plsc file by hadesz on 11-04-2007 at 05:46 PM

Hi Guys!

How can i execute a file, which is stored within the plugin file?

I wanna make a script for ASUS notebooks, which blinks the E-Mail LED...


RE: Execute an .exe from the .plsc file by vikke on 11-04-2007 at 05:55 PM

What for, exactly?
You can include it in the PLSC, and then create a script that starts the actual EXE.


RE: Execute an .exe from the .plsc file by hadesz on 11-04-2007 at 06:20 PM

I wanna include the executables, which controls the LEDs, forexample LED_on.exe LED_off.exe.
How can i execute one of them?


RE: Execute an .exe from the .plsc file by matty on 11-04-2007 at 06:31 PM

Tips

How about you search the forums?


RE: Execute an .exe from the .plsc file by vikke on 11-04-2007 at 06:33 PM

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");


RE: Execute an .exe from the .plsc file by hadesz on 11-04-2007 at 06:49 PM

Thanx


RE: Execute an .exe from the .plsc file by ShawnZ on 11-04-2007 at 11:06 PM

why are you using an EXE to do it?


RE: Execute an .exe from the .plsc file by hadesz on 11-05-2007 at 08:42 AM

Because I don't know how to talk with a driver in Java...


RE: Execute an .exe from the .plsc file by ShawnZ on 11-05-2007 at 08:58 AM

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.
RE: Execute an .exe from the .plsc file by hadesz on 11-05-2007 at 09:43 AM

Okay.

I  wan't to turn on my notebooks (ASUS A6Vm) e-mail led, when i get a new msn message


RE: Execute an .exe from the .plsc file by markee on 11-05-2007 at 10:31 AM

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 |-)
RE: RE: Execute an .exe from the .plsc file by hadesz on 11-05-2007 at 11:46 AM

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
RE: Execute an .exe from the .plsc file by markee on 11-05-2007 at 11:48 AM

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\"");
}

RE: RE: Execute an .exe from the .plsc file by vikke on 11-05-2007 at 03:07 PM

Sorry, use the "ShellExecute" function instead of "Run". So it would be:

code:
objShell.ShellExecute(MsgPlus.ScriptFilesPath + "\\" + Name + ".exe");