ExecProg
Executes a program, which does also include capturing stdout (ie what it prints out). Erm, primarily useful as you can write python, perl etc scripts then get Scar to execute them and catch the output. It's somewhat badly made, as most of my stuff is, but it works - I think.
I will say now it is a potentially dangerous plugin as it may allow people to run malicious programs, but as long as you have enough sense to check which program will be run and if it runs a script, then checking which script it will run and ensuring none of the above are malicious, you should be ok.
A little test script:
SCAR Code:
var
s: string;
begin
Writeln('Begin');
if (InitProgram('C:\perl\bin\perl.exe C:\hello.pl')) then
Writeln('Initialized.')
else
begin
Writeln('Failed to initialize.');
TerminateScript;
end;
repeat
Writeln('Waiting for completion...');
Wait(50);
until (CheckProgram);
Writeln('Program comleted.');
s := FreeProgram;
if (s = '0') then
Writeln('Program was not running.')
else if (s = '1') then
Writeln('Program not finished running.')
else
Writeln('Program output: ' + s);
Writeln('End');
end.
This assumes you have a perl program installed in C:\perl\bin\perl.exe and a script called hello.pl in C:\ - change it as desired.
Likewise, feel free to modify it and do what you wish - this really was just a basic version I made to try and get other languages interacting with Scar.
Lastly, much kudos to Raymond who helped me find the online resources to produce it and is also just awesome in general. As always, sauce is included with plugin.
To be honest, I would say you would be insane to even run Scar with the plugin in place without at least checking the sauce - especially after I mentioned how it could be malicious. I mean, I may have even compiled the dll with malicious code, then supplied the sauce to lull you into a false sense of security. Basically, if Windows *maybe* crashes and *maybe* when you restart, Ubuntu comes up, don't blame me.
By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.