Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@gattu /x

author: { name: "Aman", email: ""},
license: "GPL",
description: _("Opens MS Paint. Currently works with Windows only"),
name: ['paint'],
arguments: [],
execute: function(args) {
var process = Components.classes[";1"].createInstance(Components.interfaces.nsIProcess);
var path = "c:\\windows\\system32\\mspaint.exe";
var args = path.split(" ");
var executable = Components.classes[";1"].createInstance(Components.interfaces.nsILocalFile);
executable.followLinks = true;
if (executable.exists() && executable.isExecutable()) {
args.splice(0,1);, args , args.length);
} else {
displayMessage(args[0] + ' is not an executable');
preview: function(pblock, args) {
s = _("Opens Windows MS Paint.") + "<br>";
pblock.innerHTML = CmdUtils.renderTemplate(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.