Coder Social home page Coder Social logo

Comments (2)

aik099 avatar aik099 commented on May 25, 2024

Looking at the screenshot I can tell, that you've copied over contents from https://github.com/aik099/PhpStormProtocol/tree/master/PhpStorm%20Protocol%20(Win) folder directly to the C:\Program Files\ folder. That is incorrect.

You should copy https://github.com/aik099/PhpStormProtocol/tree/master/PhpStorm%20Protocol%20(Win) folder itself into C:\Program Files\ so at the end you'll have a C:\Program Files\PhpStorm Protocol (Win) folder and any further actions should happen in there.

from phpstormprotocol.

yangweijie avatar yangweijie commented on May 25, 2024

Yes, the reason for pop occus is the wrong path of run_editor.js. But for phpstorm://open?file=%file&line=%line format , Your regexp is not suitable.
So i rewrite the script for myself.

var settings = {
    bin_path: "D:\\Program Files\\JetBrains\\PhpStorm 2022.3.2\\bin\\phpstorm64.exe ",
    window_title: 'PhpStorm'
};
var url = decodeURIComponent(WScript.Arguments(0));
//WScript.Echo(url);
if(url.indexOf('phpstorm') != -1){
	var line = url.substring(url.indexOf('&line=')+6);
	url = url.substring(url.indexOf('file='));
	var file = url.substring(url.indexOf('file=')+5, url.indexOf('&'));
	var editor = settings.bin_path+'--line %line% "%file%"';
	var command = editor.replace(/%line%/g, line)
        .replace(/%file%/g, file)
        .replace(/\//g, '\\');
    //WScript.Echo(command);
    var shell = new ActiveXObject('WScript.Shell');
    shell.Exec(command);
    shell.AppActivate(settings.window_title);
}else{
	WScript.Echo(url.indexOf('错误的url协议'));
}

Which is less complex and works ok.

from phpstormprotocol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.