Integration JS and VB scripts to the program Call Office
Call Office software product was designed with the expectation that it could be used as a possible larger companies for commercial purposes, and individual users for their daily needs. In fact, anyone with basic programming skills and knowledge of JavaScript or VB scripts, based on our program, announcements, can create their own applications for the computer, notifying him (or any other person or group of people) about anything.
Consider for illustrative examples of how this works for the four main functions of the program.
Suppose you have a computer and a child, whose access to the computer is strictly limited. The situation, of course, requires control, but when the adults at work, control it problematic. Way out could be a script that interacts with the Call Office, and sending sms-message to your mobile every time, for example, a particular user logs in, or when the time of the system exceeds a certain limit. After receiving this message, you will already be able to take disciplinary measures.
//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
SMS-answering machine function can be used to write the script for forgetful users. Of course, turn off the stove or the light in the hallway, you can not remotely, but with the right script and sending sms from your phone to your computer, you can remotely turn it off if you forget to do it when leaving the house.
//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
For automatic outgoing calls is a set of use cases. In fact it can be a reminder of what you want on your phone. For example, a script can be closer to the end of the month calls a day to remind you that it would be nice to pay for internet.
//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
Voicemail software can also be useful in everyday life. This feature is quite relevant, again, for remote control of the system - operating time, the user is working, or something else. That is, leaving such a script is running, you can check its work, call and listen to the message of the program.
//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
Thus, knowing the basics, such scripts, you can create alerts for the call (by calling or sending sms) on almost any event on your PC. The program is quite flexible in your work and with your scripts can automate and make home life easier.
Learn more about the features included in the Call Office and the possibility of purchase here.