Tut mir leid, liebe User, aber ich mache für heute Schluß.
Vorbereitungen für heute abend.
Vielen Dank für Eure Hilfe und ich wünsche Euch einen Guten Rutsch. ![]()
Tut mir leid, liebe User, aber ich mache für heute Schluß.
Vorbereitungen für heute abend.
Vielen Dank für Eure Hilfe und ich wünsche Euch einen Guten Rutsch. ![]()
Wenn es am Wurzelverzeichnis liegen könnte, mache ich mal folgenden Versuch.
Ich deinstalliere FreeCommander und installiere es einfach in mein Laufwerk D:. Dann verändere ich im Script den Pfad auf
'FreeCommander', path: 'D:\\FreeCommander\\FreeCommander.exe' um.
Zitat von milupo
Darum geht es nicht. Das ist die Verknüpfung auf dem Desktop. Ich meinte, welches Symbol wird in Firefox angezeigt. Es geht um die Pfadangabe im Skript.Sag mal, wie heisst denn dein Wurzelverzeichnis? C: oder WinVistaHome (C:) oder nur WinVistaHome? Teste mal.
milupo:
Habe nun alle Möglichkeiten WinVistaHome (C:) und WinVistaHome sowie WinVistaHome(C:) [ohne Leertaste] und natürlich auch C: getestet.
Keine Änderung vorhanden.
Zitat von milupo
Darum geht es nicht. Das ist die Verknüpfung auf dem Desktop. Ich meinte, welches Symbol wird in Firefox angezeigt. Es geht um die Pfadangabe im Skript.Sag mal, wie heisst denn dein Wurzelverzeichnis? C: oder WinVistaHome (C:) oder nur WinVistaHome? Teste mal.
Teste mal alles durch. Gute Idee. :klasse:
Soll ich Dir mal den Inhalt bzw. Text der Scripte hier rein coden ?
Ich habe mal das Symbol zum FreeCommander kopiert und als Screenshot eingestellt.
[Blockierte Grafik: http://www.bilder-hosting.info/vorschau/klz1356958634w.jpg]
Ebenso den Pfad in meinem Win Vista. Vllt. habe ich doch was falsch gemacht.
[Blockierte Grafik: http://www.bilder-hosting.info/vorschau/bwy1356958691p.jpg]
Zitat von 2002AndreasIn deinem Ordner chrome sieht es auch so aus, mit den richtigen Dateiendungen!?
[Blockierte Grafik: http://www7.pic-upload.de/thumb/31.12.12/ttafzgz1r379.jpg]
Exakt so.
Ich habe mal im Testprofil (wo der Fehler immer auftrat), mal aus Testzwecken das Erscheinungsbild auf Standard 17.0.1 umgestellt und schon klappt zumindest das Umstellen von "button" auf "menu".
Allerdings öffnet sich der FreeCommander nicht.
Teste mal gerade mit dem CCleaner.
Irgendwas stimmt nicht.
Neues Profil erstellt.
Erweiterung userChromejs 1.5 installiert. Dazu noch Stylish.
Ordner chrome im Profil "Tester" erstellt, dort dein Script externalApplications.uc.js nur mit CCleaner reinkopiert.
Dazu noch addRestartButton.uc.js, wegen dem Cache löschen.
Neues Profil neugestartet und nix passiert.
Den Pfad userChrome.import("*", "UChrm"); habe ich in die Datei eingefügt. Da stand aber schon der unten kopierte Text. Den löschen oder belassen ?
/*
* userChromeJS
*
* This file can be used to customize the functioning of Mozilla's user
* interface. Usage and syntax follow below; for useful code snippets see
* http://mozilla.zeniko.ch/userchrome.js.html.
*
* Examples:
* setTimeout(function() { document.title = "A new title for every window" }, 2000);
*
* if (location == "chrome://browser/content/browser.xul") {
* alert("Script loaded in main browser only");
* }
*
* // DOMi window
* if (location == "chrome://inspector/content/inspector.xul") {
* // Move Urlbar box to main toolbar
* var tb = document.getElementById('bxURLBar');
* var el = document.getElementById('mbrInspectorMain');
* if (tb && el) el.appendChild(tb, el.firstChild);
* }
*
* NOTE: userChromeJS includes an 'import' function to facilitate file management.
* An absolute path or relative path with Directory name property token can be
* used, as follows:
*
* // Single file (javascript .js or overlay .xul file)
* userChrome.import("Full file path");
* userChrome.import("Relative file path", "Token");
* // All .js and .xul files in a folder will be loaded.
* userChrome.import("Full file folder path");
* userChrome.import("Relative file folder path/name", "Token");
* userChrome.import("*", "Token");
*
* NOTE: absolute windows files and folders must be have backslash escaped:
* "C:\\Program Files\\Mozilla\\scripts\\myscript.js"
*
* Examples:
* // Import script in [ProfileDir]/chrome/scripts/myscript.js
* userChrome.import("scripts/myscript.js", "UChrm");
* // Import script in [Profiles]/scripts/myscript.js (share same script in
* // multiple profiles
* userChrome.import("scripts/myscript.js", "DefProfRt");
* // All .js or .xul in profile chrome directory
* userChrome.import("*", "UChrm");
* // Import overlay
* userChrome.import("C:\\Program Files\\Mozilla\\scripts\\myOverlay.xul");
* // Import everything in Desktop folder /scripts
* userChrome.import("scripts", "Desk");
* // Perhaps the only thing you need in this file..
* if (location == "chrome://browser/content/browser.xul") {
* userChrome.import("scripts", "DefProfRt");
* }
*
* NOTE: for a full listing of directory tokens see the two links found here:
* https://developer.mozilla.org/en/Code_snippets/File_I%2f%2fO#Getting_special_files
* // What's the path for a token? This will print it in the console..
* userChrome.log(userChrome.getAbsoluteFile("Desk").path, "getAbsoluteFile:'Desk'");
*
* NOTE: userChromeJS includes a log function, invoked as follows:
* userChrome.log("string1", ["string2"])
* Example:
* userChrome.log("hello world!", "myscript.js");
* Results in a console message:
* 2009-05-22 18:07:40 userChromeJS.js::myscript.js: hello world!
*
* NOTE: the date format for the userChrome.log console logger may be user defined:
* Example:
* userChrome.dateFormat = "%Y-%m-%d %H:%M:%S";
*
* NOTE: the default charSet is "UTF-8"; for code using the 'import' or
* 'importFolder' functions to manage files, the charSet for subscript loader
* may be user defined, prior to calling the import or importFolder functions:
* Example:
* userChrome.charSet = "UTF-8";
*
* NOTE: the following shortcuts are predefined:
* Cc = Components.classes;
* Ci = Components.interfaces;
* Cr = Components.results;
* Cu = Components.utils;
*
*/
userChrome.import("*", "UChrm");
Alles anzeigen
Welche Dateien gehören noch in den Ordner chrome?
userChrome.js
userChrome.css
userChrome-example.css
userContent.css
userContentexample.css
alle richtig??
Guten Tag, Andreas.
So, erstelle mir jetzt ein neues Profil. Soll ich aus Testzwecken nun den CCleaner mal einfügen?
Hallo, fachkundiges Publikum ! :klasse:
Heute versuche ich noch einmal mein Glück, das Script ans Laufen zu bringen. Mich macht nur stutzig, dass die ersten drei Anwendungen ( Notepad, Calculator und Command Prompt ) starten und die letzte Anwendung ( FreeCommander ) nicht, obwohl ich den Pfad überprüft habe und so ins Script reinkopiert habe.
Auch habe ich das Script addrestartbutton mit dem Löschen des Caches.
Frage: Kann es auch an Erweiterungen liegen? Soll ich mal alle Erweiterungen testen, indem ich sie nach und nach deinstalliere? :-??
Edit: :-?? Obwohl ich jetzt auf "button" umgestellt hatte, erscheint nur "menu".
:arrow: siehe Teil-Kopie im Script.
var gExternalApplications = {
type: 'button', //'menu' or 'button'
insertafter: 'menubar-items',
:-?? Auch einem Neustart des FF nur Menu. :-?? Boah ey, ich werde.... :grr:
milupo: Dein Scrpt getestet. Ergebnis siehe oben. (Mich macht nur stutzig, dass die ersten drei Anwendungen ( Notepad, Calculator und Command Prompt ) starten und die letzte Anwendung ( FreeCommander ) nicht, obwohl ich den Pfad überprüft habe und so ins Script reinkopiert habe. )
Habe das mal mit CCleaner getestet und wieder auf Menu umgestellt. CCleaner taucht nicht unter Start auf. :-??
// ==UserScript==
// @name externalApplications.uc.js
// @namespace ithinc#mozine.cn
// @description External Applications
// @include main
// @compatibility Firefox 3.5.x
// @author ithinc
// @version 20091212.0.0.1 Initial release
// ==/UserScript==
/* :::: External Applications :::: */
var gExternalApplications = {
type: 'menu', //'menu' or 'button'
insertafter: 'menubar-items',
apps: [
{name: 'Notepad', path: '/WINDOWS/system32/notepad.exe'},
{name: 'Calculator', path: '.\\.\\..\\..\\WINDOWS\\system32\\calc.exe'},
{name: 'Command Prompt', path: 'C:\\WINDOWS\\system32\\cmd.exe'},
{name: 'separator'},
{name: 'CCleaner', path: 'C:\\Programme\\CCleaner\\CCleaner.exe', args: ['%u']},
],
init: function() {
for (var i=0; i<this.apps.length; i++) {
if (!this.apps[i].path) continue;
if (!this.apps[i].args) this.apps[i].args = [];
this.apps[i].path = this.apps[i].path.replace(/\//g, '\\');
var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('CurProcD', Ci.nsIFile).path;
if (/^(\\)/.test(this.apps[i].path)) {
this.apps[i].path = ffdir.substr(0,2) + this.apps[i].path;
}
else if (/^(\.)/.test(this.apps[i].path)) {
this.apps[i].path = ffdir + '\\' + this.apps[i].path;
}
}
if (this.type == 'menu') {
var mainmenu = document.getElementById('main-menubar');
var menu = mainmenu.appendChild(document.createElement('menu'));
menu.setAttribute('label', 'Start');
menu.setAttribute('accesskey', 'a');
var menupopup = menu.appendChild(document.createElement('menupopup'));
for (var i=0; i<this.apps.length; i++) {
menupopup.appendChild(this.createMenuitem(this.apps[i]));
}
}
else {
var menubarItems = document.getElementById(this.insertafter);
var toolbaritem = menubarItems.parentNode.insertBefore(document.createElement('toolbaritem'), menubarItems.nextSibling);
toolbaritem.setAttribute("class", "chromeclass-toolbar-additional");
toolbaritem.setAttribute("orient", "horizontal");
for (var i=0; i<this.apps.length; i++) {
toolbaritem.appendChild(this.createButton(this.apps[i]));
}
}
},
exec: function(path, args) {
for (var i=0; i<args.length; i++) {
args[i] = args[i].replace(/%u/g, gBrowser.currentURI.spec);
}
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile);
file.initWithPath(path);
if (!file.exists()) {
throw 'File Not Found: ' + path;
}
if (!file.isExecutable() || args.length==0) {
file.launch();
}
else {
var process = Cc['@mozilla.org/process/util;1'].getService(Ci.nsIProcess);
process.init(file);
process.run(false, args, args.length);
}
},
createButton: function(app) {
if (app.name == 'separator')
return document.createElement('toolbarseparator');
var item = document.createElement('toolbarbutton');
item.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional');
item.setAttribute('label', app.name);
item.setAttribute('image', 'moz-icon:file:///' + app.path + '?size=16');
item.setAttribute('oncommand', 'gExternalApplications.exec(this.path, this.args);');
item.setAttribute('tooltiptext', app.name);
item.path = app.path;
item.args = app.args;
return item;
},
createMenuitem: function(app) {
if (app.name == 'separator')
return document.createElement('menuseparator');
var item = document.createElement('menuitem');
item.setAttribute('class', 'menuitem-iconic');
item.setAttribute('label', app.name);
item.setAttribute('image', 'moz-icon:file:///' + app.path + '?size=16');
item.setAttribute('oncommand', 'gExternalApplications.exec(this.path, this.args);');
item.path = app.path;
item.args = app.args;
return item;
}
};
gExternalApplications.init();
Alles anzeigen
:arrow: Die neue Version userChromeJs 1.5 hatte ich vorher auch neu installiert.
Aber sei doch mal ehrlich, ist doch sehr merkwürdig. Vllt. sollte ich das mal in einem ganz neuen Profil testen, aber das dauert heute abend wahrscheinlich zu lange.
Hi, Andreas.
Die Änderung habe ich nun mit kleinem "b" gemacht und nun kann ich die Anwendungen auch oben in der Leiste sehen.
Auch ein Doppelklick auf FreeCommander öffnet nicht das Programm.
Nun sind wir aber schon einen kleinen Schritt weiter, denn die Buttons sind in der Leiste sichtbar. :klasse:
:arrow: Aber trotzdem verzweifele ich langsam, aber sicher! :-??
milupo: Vielen Dank für Deine Mühen.
Ich habe den Script noch einmal hier kopiert.
// ==UserScript==
// @name externalApplications.uc.js
// @namespace ithinc#mozine.cn
// @description External Applications
// @include main
// @compatibility Firefox 3.5.x
// @author ithinc
// @version 20091212.0.0.1 Initial release
// ==/UserScript==
/* :::: External Applications :::: */
var gExternalApplications = {
type: 'menu', //'menu' or 'button'
insertafter: 'menubar-items',
apps: [
{name: 'Notepad', path: '/WINDOWS/system32/notepad.exe'},
{name: 'Calculator', path: '.\\.\\..\\..\\WINDOWS\\system32\\calc.exe'},
{name: 'Command Prompt', path: 'C:\\WINDOWS\\system32\\cmd.exe'},
{name: 'separator'},
{name: 'FreeCommander', path: 'C:\\Programme\\FreeCommander\\FreeCommander.exe', args: ['%u']},
],
init: function() {
for (var i=0; i<this.apps.length; i++) {
if (!this.apps[i].path) continue;
if (!this.apps[i].args) this.apps[i].args = [];
this.apps[i].path = this.apps[i].path.replace(/\//g, '\\');
var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('CurProcD', Ci.nsIFile).path;
if (/^(\\)/.test(this.apps[i].path)) {
this.apps[i].path = ffdir.substr(0,2) + this.apps[i].path;
}
else if (/^(\.)/.test(this.apps[i].path)) {
this.apps[i].path = ffdir + '\\' + this.apps[i].path;
}
}
if (this.type == 'menu') {
var mainmenu = document.getElementById('main-menubar');
var menu = mainmenu.appendChild(document.createElement('menu'));
menu.setAttribute('label', 'Start');
menu.setAttribute('accesskey', 'a');
var menupopup = menu.appendChild(document.createElement('menupopup'));
for (var i=0; i<this.apps.length; i++) {
menupopup.appendChild(this.createMenuitem(this.apps[i]));
}
}
else {
var menubarItems = document.getElementById(this.insertafter);
var toolbaritem = menubarItems.parentNode.insertBefore(document.createElement('toolbaritem'), menubarItems.nextSibling);
toolbaritem.setAttribute("class", "chromeclass-toolbar-additional");
toolbaritem.setAttribute("orient", "horizontal");
for (var i=0; i<this.apps.length; i++) {
toolbaritem.appendChild(this.createButton(this.apps[i]));
}
}
},
exec: function(path, args) {
for (var i=0; i<args.length; i++) {
args[i] = args[i].replace(/%u/g, gBrowser.currentURI.spec);
}
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile);
file.initWithPath(path);
if (!file.exists()) {
throw 'File Not Found: ' + path;
}
if (!file.isExecutable() || args.length==0) {
file.launch();
}
else {
var process = Cc['@mozilla.org/process/util;1'].getService(Ci.nsIProcess);
process.init(file);
process.run(false, args, args.length);
}
},
createButton: function(app) {
if (app.name == 'separator')
return document.createElement('toolbarseparator');
var item = document.createElement('toolbarbutton');
item.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional');
item.setAttribute('label', app.name);
item.setAttribute('image', 'moz-icon:file:///' + app.path + '?size=16');
item.setAttribute('oncommand', 'gExternalApplications.exec(this.path, this.args);');
item.setAttribute('tooltiptext', app.name);
item.path = app.path;
item.args = app.args;
return item;
},
createMenuitem: function(app) {
if (app.name == 'separator')
return document.createElement('menuseparator');
var item = document.createElement('menuitem');
item.setAttribute('class', 'menuitem-iconic');
item.setAttribute('label', app.name);
item.setAttribute('image', 'moz-icon:file:///' + app.path + '?size=16');
item.setAttribute('oncommand', 'gExternalApplications.exec(this.path, this.args);');
item.path = app.path;
item.args = app.args;
return item;
}
};
gExternalApplications.init();
Alles anzeigen
Die Erweiterung UserChromeJS.xpi (version 1.4) habe ich mal deinstalliert und dann neu installiert.
Leider brachten diese Lösungen keinen Erfolg.
Aber es ist für mich merkwürdig, dass ich im Script noch was ändern wollte; nämlich auf "Button" geändert, nach einem Neustart war nichts festzustellen.
Hier mal meine Erweiterungen etc., falls das was bringt.
Letzte Aktualisierung: Sun, 30 Dec 2012 16:49:43 GMT
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20100101 Firefox/17.0
Erweiterungen (aktiviert: 21, deaktiviert: 0):
Adblock Plus 2.2.1
Add-on Compatibility Reporter 2.0
BBCodeXtra 0.3.2
CheckPlaces 2.6.2
DOM Inspector 2.0.13
Download Statusbar 0.9.10
Greasemonkey 1.5
InfoLister 0.10.4a3
Inspect Context 1.00
LCD Clock 0.4.2
Linkification 1.3.8
Menu Editor 1.2.7
Multirow Bookmarks Toolbar Plus 1.2
PDF Download 3.0.0.2
Silvermel and Charamel XT 1.5.4
Status-4-Evar 2012.07.08.17
Stylish 1.3.1
Tab Mix Plus 0.4.0.4pre.121222b
Toolbar Buttons 1.0
userChromeJS 1.4
Vacuum Places Improved 1.2
Themes (12):
Blue Christmas Tree 1337634534 [ausgewählt]
Charamel 1.5.4
Default 17.0.1
F-16 Orange 1264895711
Fire-kNup 1260925626
LavaFox V2 2.0.7
lucky Bamboo 1280300569
Silvermel 1.5.4
Star Wars - Death Star
Thats No Moon 1269550432
Typhoon RAF 1265411965
U. S. A. 1260925626
Plugins (13):
Adobe Acrobat
Cooliris embedded in a tab
Google Earth Plugin
Google Update
iTunes Application Detector
Java Deployment Toolkit 7.0.100.18
Microsoft® Windows Media Player Firefox Plugin
QuickTime Plug-in 7.7.3
Shockwave Flash
Shockwave for Director
Silverlight Plug-In
VLC Web Plugin
Windows Presentation Foundation
Alles anzeigen
:arrow: In der Einstellung Menu kann ich leider nicht doppelklicken, daher wollte ich auf Button ändern, was aber nix brachte. :-??
Lösungen ???? :-??
Probiere das später mal aus. Habe leider einen Termin. Danke für die Hilfe.
Das verstehe ich ja, Andreas, aber laut GitHub steht am Ende der Zeile args: ['%u'].
Öffnet sich denn bei Dir T-online dann?
Habe mal das Script "Restartfirefoxbutton" entfernt und es klappt immer noch nicht. Dachte, das würde sich beissen.
Aber diese Frage ist noch offen:
Was meinst Du denn mit den Zeichen ( args: ) ? Muss das rein oder nicht ?
Ich habe das Script mit beiden Möglichkeiten ( mit und ohne args: ) probiert; beides öffnet FreeCommander nicht!