sieukrem / jn-npp-plugin

Plugin for Notepad++ allowing you to automate some tasks using JavaScript
https://github.com/sieukrem/jn-npp-plugin/wiki
110 stars 24 forks source link

Open URL in default browser #56

Closed fspafford closed 7 years ago

fspafford commented 7 years ago

Is there a way to open a URL in the default browser without using Windows Script Host (mine is currently corrupted)?

In this case, I want to supply the URL to the routine that opens the URL. Can this be done by invoking a menu command?

sieukrem commented 7 years ago

Would following work?

var shell = new ActiveXObject("WScript.Shell");
if (shell){
    shell.run("http://csslint.net");
}

jN is based on WSH. What does it mean ?

mine is currently corrupted

fspafford commented 7 years ago

That is what I have been doing, and it worked fine before something happened to my PC (the corruption) and it now does not work. (Don't worry - this is a local PC problem and I will correct by reloading.)

I was just wondering if there was a second option for opening a URL.

Thanks again for making jN available!