addhaloka
Gold Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Код: //Для непортабельной - обычной версии версии замени в третьей строчке "ProfD" на "CurProcD", т.к ProfD // - это папка профиля, а CurProcD - папка установки Firefox. var profileDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("ProfD", Components.interfaces.nsILocalFile) .path; var path = profileDir + "\\..\\PasswordfoxPortable.exe"; this. runPasswordfox = function (url) { var file = Components. classes["@mozilla.org/file/local;1"]. createInstance (Components.interfaces.nsILocalFile); var process = Components. classes ["@mozilla.org/process/util;1"]. createInstance (Components. interfaces. nsIProcess); file. initWithPath (path); process. init (file); if (!this. pid) this. pid = []; this. pid. push (process. run (false, url && [url]|| null, url && 1 || 0)); }; //Запуск левой кнопкой мыши this. runPasswordfox(""); |
| Всего записей: 7432 | Зарегистр. 13-11-2010 | Отправлено: 19:15 03-05-2014 | Исправлено: addhaloka, 19:33 03-05-2014 |
|