Dynamic node wrapper

Hi all,

I would like to code a dynamic plugins that wraps an executable. I need to start a non blocking process. Imagine an nmap node, or a carnivore node.

I know wrapping is not the best solution, but it is faster than implementing an api and sometimes you just need to launch a program, or a command an catch the output.

Q: Why don’t you use shellexecute?
A: Cause it would be better to code inside a dynamic plugin all the argument option choices instead of using a module.

I attach my first attempt … it doesn’t work :) any hint?

first attempt (10.9 kB)

… no text …

if it may helps?

Process exe = new System.Diagnostics.Process();
exe.StartInfo.UseShellExecute = true;
exe.StartInfo.FileName = “notepad.exe”;
exe.StartInfo.WorkingDirectory = pluginPath;
exe.StartInfo.Arguments = "-o ";

ProcessStartInfo ps = new ProcessStartInfo();
ps.FileName="notepad.exe";
ps.Arguments="new.txt";
ps.UseShellExecute = true;
Process.Start(ps);

works for me

Both works, but since I’m using a dynamic plugin, the Evaluate method is not called if there is no output request … but it works, thank you.

ai fibo,

this is where you have to set the AutoEvaluate attribute to get your node evaluated even if it has no output.
just add it to the other attributes like name, category,…of your node class and set it to = true.

@fibo Are you wrapping pureData? )