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.)