It is currently September 19th, 2020, 9:27 am

Send file from browser to open in notepad++

Topics unrelated to Rainmeter.
User avatar
Active Colors
Moderator
Posts: 612
Joined: February 16th, 2012, 3:32 am

Send file from browser to open in notepad++

Post by Active Colors »

I have made personal New Tab page for firefox (f.e. newtab.htm) and I want there to put "Edit" button which will open this file in notepad++. I didn't find anything related in google, maybe some of you could know how to accomplish this. I want to know what url format I should write in order to open this newtab.htm from notepad++.
User avatar
jsmorley
Developer
Posts: 21365
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Send file from browser to open in notepad++

Post by jsmorley »

I'm no expert, but I think you will need some Javascript, and I'm not entirely sure you will be able to do it them. The thing is, having a web page that can open a local file on your PC is just the AntiChrist of Security in the web world.
User avatar
Active Colors
Moderator
Posts: 612
Joined: February 16th, 2012, 3:32 am

Re: Send file from browser to open in notepad++

Post by Active Colors »

I was hoping there could be a "URI method" to open the file, like mailto: .
User avatar
Brian
Developer
Posts: 2061
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Send file from browser to open in notepad++

Post by Brian »

You can create your own URI scheme.
https://msdn.microsoft.com/library/aa767914(v=vs.85).aspx

-Brian
User avatar
Active Colors
Moderator
Posts: 612
Joined: February 16th, 2012, 3:32 am

Re: Send file from browser to open in notepad++

Post by Active Colors »

Brian wrote:You can create your own URI scheme.
https://msdn.microsoft.com/library/aa767914(v=vs.85).aspx

-Brian
This is exactly what I was looking for! But it seems that I type wrong command to open the file. Notepad++ is being opened, but the file is not. This is how my link looks like: npp:D:/Lists/newtab.htm.

But I have made temporary solution. I have written address of the file right into the registry key.