1

In Google Chrome, I can type the following in a new browser:

pycharm://open?file=file_name

and press Enter. The result is that PyCharm IDE will launch and open the specified file. I have also come across similar links that launch other applications.

I tried to look for information about such links but did not reach any conclusions. Specifically, I would like to know:

  • what is the name of such a link?
  • who defines those links? Since I cannot find any documentation about those links on PyCharm's side, I am led to think that those links are some form of standard command that work for every external application?
  • how do those links work under the hood? Is it the browser spawning a new subprocess or does the browser somehow communicate the command to the OS which takes it from there?
  • I can also do the above programmatically:

window.open('pycharm://open?file=file_name', '_top');

How can I ensure that the focus switches to the target application? (Right now the application does indeed start, but the focus stays on Chrome.)

bkr879
  • 2,035
  • 2
  • 15
  • 23
  • 2
    I believe it's called a protocol, like rtsp, http, etc.. perhaps using protocol you will find info on registering one system wide. I dont believe its browser specific.. – Dan Chase Jul 18 '18 at 17:54
  • Possible duplicate of [Custom protocol handler in chrome](https://stackoverflow.com/questions/7087728/custom-protocol-handler-in-chrome) – CodingIntrigue Jul 19 '18 at 07:30

0 Answers0