简体   繁体   English

从任何浏览器启动程序/拨打电话

[英]start program/ dial telephone from any browser

I am trying the following: 我正在尝试以下方法:

I have an external program which is running in background mode, whenever I hit F8 it tries to convert whatever is currently highlighted to a telephone number and opens my call-manager. 我有一个在后台模式下运行的外部程序,每当我按F8键时,它都会尝试将当前突出显示的内容转换为电话号码并打开我的呼叫管理器。

I have a web application that displays a bunch of numbers and I came up with this script to select one number: 我有一个显示大量数字的Web应用程序,我想到了以下脚本来选择一个数字:

jQuery(function($) {
//image that's displayed before number
$('.markTel').live("click",function() {
            var myID = $(this).attr('data-rel');
            SelectText(myID+'_tel');
        });
});

function SelectText(element) {
    var doc = document
        , text = doc.getElementById(element)
        , range, selection
    ;    
    if (doc.body.createTextRange) {
        range = document.body.createTextRange();
        range.moveToElementText(text);
        range.select();
    } else if (window.getSelection) {
        selection = window.getSelection();        
        range = document.createRange();
        range.selectNodeContents(text);
        selection.removeAllRanges();
        selection.addRange(range);
    }
}

This works like a charm, now I hit F8 and my call-manager starts to work. 这就像一种魅力,现在我按了F8键,我的呼叫管理器开始工作。

Is there any way I can automatically trigger the call of the call-manager with the mouse click (lazy end-user)? 有什么方法可以通过单击鼠标(懒惰的最终用户)自动触发呼叫管理器的呼叫? I know there are scripts where I can "simulate" a keypress, but this only works within the browser, how can I start an external program? 我知道有些脚本可以“模拟”按键,但这仅在浏览器中有效,如何启动外部程序?

I don't mind if reg-keys are required as it is only a few local computers in an offline enviroment I can setup. 我不介意是否需要使用注册表键,因为在脱机环境中只能设置几台本地计算机。

Any hint is appreciated, thank you 任何提示表示赞赏,谢谢

In the near future, support for "phone number" weblinks & dialling will rapidly improve. 在不久的将来,对“电话号码”网络链接和拨号的支持将迅速改善。 HTML5 now supports "telephone number" links (eg. <a href='tel:+13174562564'> ) which are diallable, for mobile-phone support. HTML5现在支持可拨号的“电话号码”链接(例如<a href='tel:+13174562564'> ),以支持移动电话。

Maybe now, or in the near future, your dialler will add support for these? 也许是现在或不久的将来,您的拨号器会增加对这些功能的支持吗? Feel free to ask/prompt the vendor for this, since this is the proper way to integrate & vendors know HTML5/ telephony is coming.. They're probably already working on it! 随意询问/提示供应商,因为这是集成的正确方法,而且供应商知道HTML5 /电话即将问世。.他们可能已经在努力!


But as for scripting it, browsers deliberately are & should be barred from activating external software, because starting external software would enable malicious webpages to initiate all kind of virus/ malware behaviours. 但是就脚本编写而言,故意并禁止浏览器激活外部软件, 因为启动外部软件将使恶意网页能够启动各种病毒/恶意软件行为。

You'll need a program/service installed on the computer separately to enable this. 您需要单独在计算机上安装一个程序/服务才能启用此功能。

There is some exception to this blanket prohibition -- if you enable & authorize explicit ActiveX/ Java applet/ Adobe Flash components, you can accomplish 1) some (limited) local interaction, 2) within the scope of what you can deploy & authorize & is compatible, and 3) within the limits of what the chosen component/plugin platform allows. 全面禁止存在一些例外-如果启用并授权显式ActiveX / Java applet / Adob​​e Flash组件,则可以完成1)一些(有限的)本地交互,2)在可以部署和授权的范围内兼容,并且3)在所选组件/插件平台允许的范围内。

Generally neither applets nor ActiveX are great technology to rely on for widespread usage, both have many problems & drawbacks and permissioning/signing the things to authorize sufficient privileges to work your dialler will take quite some work. 通常,小程序和ActiveX都不是广泛使用所依赖的出色技术,两者都具有许多问题和弊端,并且允许/签名事物以授权足够的特权来使用您的拨号程序将需要很多工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM