admin管理员组文章数量:1313756
I am trying to have an application open when a link is clicked on in a webpage. Lets say if I clicked the link that says iTunes it would open iTunes. I am not sure if this is similar but if you go to an album link for iTunes that opens in the web browser, it will open iTunes to that page. Remember this is for mac. Also, the other tutorials that I have tried did not work. Other tutorials used JavaScript so I am guessing that I will need to use this as well.
I am trying to have an application open when a link is clicked on in a webpage. Lets say if I clicked the link that says iTunes it would open iTunes. I am not sure if this is similar but if you go to an album link for iTunes that opens in the web browser, it will open iTunes to that page. Remember this is for mac. Also, the other tutorials that I have tried did not work. Other tutorials used JavaScript so I am guessing that I will need to use this as well.
Share Improve this question asked Jan 19, 2013 at 13:49 nmacbook.nicknmacbook.nick 1511 gold badge1 silver badge8 bronze badges 3- this only works if the application registered a protocol. For iTunes it is e.g. itmss:// – t.niese Commented Jan 19, 2013 at 13:53
- @t.niese Okay, I was thinking incorrectly then (about launching the iTunes store) but is it possible to open an app say Mail, iTunes, Pages, etc.? – nmacbook.nick Commented Jan 19, 2013 at 14:32
- do you have control over the system where the webpage is opened ? – t.niese Commented Jan 19, 2013 at 14:54
1 Answer
Reset to default 5You can not only open an application. you e.g. can tell an application that registered a protocol to do an action. You can tell iTunes to open an album with the itmss://
protocol. Instant messenger may have registered e.g. aim://
, skype://
or similar so that you can directly open a chat window. You can create a link with mailto:[email protected]
to tell the default mail application to start a new mail with this address. But you can not start the application directly by default.
If you have control over the system where the webpage ist opened, e.g. an in-house launching service or something like that. You could think of creating an protocol default handler for launching applications.
本文标签: javascriptHow to launch an application from a link in a webpage on macStack Overflow
版权声明:本文标题:javascript - How to launch an application from a link in a webpage on mac - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741957814a2407091.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论