Run vbs file from ImageJ

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Run vbs file from ImageJ

lechristophe
Dear ImageJers,

This question is for Windows people. I'd like to trigger the execution of a
visual basic script from ImageJ in XP.
For that, I'd like to be able to launch my script from the command line (not
the "Execute..." from start panel, but the XP terminal) and use this command
from the exec() macro function in ImageJ? Do anyone know how to launch a vbs
script from the terminal in Windows XP ? I could'nt manage to use the
cscript.exe command as it is the only hint I got from the internet...

Thanks,

Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Run vbs file from ImageJ

dscho
Hi,

On Thu, 30 Oct 2008, Christophe Leterrier wrote:

> This question is for Windows people. I'd like to trigger the execution
> of a visual basic script from ImageJ in XP.

It seems that the only way to trigger this is by calling something like

        Runtime.getRuntime().exec("start script.vbs");

on DOS-based Windows (95, 98, ME) and

        Runtime.getRuntime().exec("cmd /c start script.vbs");

on VMS-based ones (NT, 2k, XP, Vista).

You cannot do that from a macro script, but you could use Javascript, or
write a plugin that has a public static method calling the exec() method.

Hth,
Dscho