darktrojan / openwith

Open With add-on for Firefox
https://addons.mozilla.org/addon/open-with/
412 stars 71 forks source link

open file in notepad #111

Closed mediatechnologic closed 8 years ago

mediatechnologic commented 8 years ago

In the past the add-on Launchy did work perfect to open any file in any application, e.g. text files with notepad++ or notepad. With add-on OpenWith I did not yet succeed, because with "%s" apparently the complete path including http:// or file:// is send to the target application. The editor does not understand this (Error: Syntax for file, directory or volume is wrong). Which syntax is required for OpenWith to send text file in the browser to the target text editor?

mediatechnologic commented 8 years ago

One workaround to open local files file:///c:/path/file.ext with notepad seems to be only a batch file. Here is some command line code for such a bat file: @echo off set para=%1% echo para = %para% set note=c:\insert here full path to \notepad++.exe SETLOCAL ENABLEDELAYEDEXPANSION set para=!para:file:///=! set para=!para:/=\! echo para = %para% pause %note% %para% exit This batch file has to be configured in OpenWith as new item. Apparently no parameter like "%s" is required, because the URL with file:///... is forwarded already as %1 to the batch file.

darktrojan commented 8 years ago

There's a way to do this through about:config. This part of the wiki should help you out.

mediatechnologic commented 8 years ago

Thank you very much DarkTrojan. Does work now perfectly! Here is my complete setting for NotePad++ through modifications with about:config. The parameters | Name | Type | Value | are as follows::

Take care, the 8 character key name (here C46O4hsQ) is different for any user and browser and of course also the specific path to the application executable. Just type "openwith.manual" in the search bar of about:config and you see all manual entries of OpenWith grouped nicely together.

BTW, the key benefit with this combined usage of local txt files in NotePad++ and FireFox with Add-On Linkification is the automatic clickable hyperlinking of all URLs. This is ideal for collecting and managing text information and URLs together (much better than any bookmark manager). Additional user defined protocols through windows registry like edit:// and path:// can extend the efficiency with clickable URLs even more.