Call Perl script from Thunderbird Javascript -
i wrote perl script handles data automatically. however, face problem when try call script thunderbird extension naturally written in javascript.
var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); file.initwithpath("/usr/bin/perl"); // create nsiprocess var process = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess); process.init(file); // run process. // if first param true, calling thread blocked until // called process terminates. // params used pass command-line arguments // process var args = ["package/myperlscript.pl", "some arguments]; process.run(true, args, args.length);
i guess have perl script placed @ wrong location. tried various ones, not work. if major mistake, base path javascript file expects?
Comments
Post a Comment