将 JS 和 VB 脚本集成到 Call Office 程序中

Call Office 软件产品的设计初衷是希望它可以用作可能的大型公司用于商业目的,以及个人用户的日常需求。事实上,任何具有基本编程技能和 JavaScript 或 VB 脚本知识的人,根据我们的程序、公告,都可以为计算机创建自己的应用程序,通知他(或任何其他人或一群人)任何事情。

考虑一下这如何适用于程序的四个主要功能的说明性示例。

假设您有一台计算机和一个孩子,他们对计算机的访问受到严格限制。这种情况当然需要控制,但是当成年人在工作时,控制它就成问题了。出路可能是与呼叫办公室交互的脚本,并在每次(例如,特定用户登录或系统时间超过特定限制时)向您的手机发送短信。收到此消息后,您就可以采取纪律措施了。

//JavaScript example
if (The condition of posting == true) {
   var Device = new ActiveXObject ("CallOffice.Device");

   Device.Open ();
   var Result = Device.SendSMS ('8987654321 - your phone number', "Test message");
   if (Result == 0){
      alert("Message sent!");
   }
   Device.Close ();
}
'VBscript example
if The condition of posting = true then
   Dim Device
   Set Device = CreateObject ("CallOffice.Device")

   Device.Open

   Result = Device.SendSMS ("8987654321 - your phone number", "Test message")

   if Result = 0 then
      MsgBox "Message sent!"
   end if
   Device.Close
end if

可以使用短信答录机功能为健忘用户编写脚本。当然,关掉走廊里的炉子或灯,你不能远程,但是通过正确的脚本,从你的手机发送短信到你的电脑,如果你离开家忘记这样做,你可以远程关闭它.

//JavaScript example
var Device = new ActiveXObject ("CallOffice.Device");

Device.Open ();
var Result = Device.WaitForSMS (-1);
if (Result == 0) {
   any action on the computer
}
Device.Close ();
'VBscript example
Dim Device
Set Device = CreateObject ("CallOffice.Device")
Device.Open

Result = Device.WaitForSMS (-1)

if Result = 0 then
   any action on the computer
end if

Device.Close

自动拨出电话是一组用例。事实上,它可以提醒您在手机上想要什么。例如,一个脚本可以在接近月底的时候每天打电话提醒您支付互联网费用会很好。

//JavaScript example
if (date of call == date today) {
   var Device = new ActiveXObject ("CallOffice.Device");

   Device.Open ();
   var Result = Device.Dial ('8987654321 - your phone number', 40);
   if (Result == 0){
      Device.Say ("Have to pay for internet.wav");
   }
   Device.HangUp ();
   Device.Close ();
}
'VBscript example
if date of call = date today then
   Dim Device
   Set Device = CreateObject ("CallOffice.Device")

   Device.Open

   Result = Device.Dial ("8987654321 - your phone number", 40)

   if Result = 0 then
      Device.Say "Have to pay for internet.wav"
   end if

   Device.HangUp
   Device.Close
end if

语音信箱软件在日常生活中也很有用。此功能与系统的远程控制非常相关 - 操作时间、用户正在工作或其他内容。也就是说,离开这样一个脚本正在运行,你可以检查它的工作,调用和收听程序的消息。

//JavaScript example
var Device = new ActiveXObject ("CallOffice.Device");
Device.Open ();
var Result = Device.WaitForCall (-1);
if (Result == 0) {
   Device.Say ("User --- works in the system -- hours -- minutes");
}
Device.HangUp ();
Device.Close ();
'VBscript example
Dim Device
Set Device = CreateObject ("CallOffice.Device")
Device.Open

Result = Device.WaitForCall (-1)

if Result = 0 then
   Device.Say "User --- works in the system -- hours -- minutes"
end if

Device.HangUp
Device.Close

因此,了解基础知识,例如脚本,您几乎可以在 PC 上的任何事件上为呼叫创建警报(通过呼叫或发送短信)。该程序在您的工作中非常灵活,并且您的脚本可以自动化并使家庭生活更轻松。

在此处了解有关 Call Office 中包含的功能以及购买可能性的更多信息。

 
FaLang translation system by Faboba