Script Language (Classic)

Top  Contents  Index 

As of version 1.6.5.0, Ascendis Caller ID supports more complex scripts using DWS.  You can continue to use the original script language as defined here, but DWS is considerably more powerful.

 

 

Advanced actions are specified using a script.  The Ascendis Caller ID scripting language is statement based.  Statements must be terminated with a semicolon.  You can put multiple statements on one line, but it is not recommended.  Arguments can contain macros.

 

Lines starting with "//" are comments and are ignored.

 

The following commands are currently supported:

DeleteCall;

- deletes current call

- examples:

DeleteCall;

 

 

Export <data to export> <file format> "<filename>";

- <data to export> is one of CALLS, CONTACTS, ACTIONS

- <file format> is CSV or HTML

- exports a database to a file

- if <filename> does not contain a path specification, the Ascendis Caller ID program folder will be used

- examples:

Export CALLS HTML "calls.htm";

Export contacts csv "contacts.csv";

 

 

HangUp

- hangs up the phone

- examples:

HangUp;

 

 

Log "<filename>" "<log text>";

- adds a line to named text file consisting of "<log text>"

- if <filename> does not contain a path specification, the Ascendis Caller ID program folder will be used

- examples:

Log "calls.txt" "{DateTime} - Call from {Name} at {Number}";

Log "privateCalls.txt" "{DateTime} :: Another anonymous call!";

 

 

LogActivity "<log text>";

- adds a line to the activity log

- examples:

LogActivity "Hanging up on {Name} at {Number}";

LogActivity "{DateTime} :: Another anonymous call!";

 

 

Run "<filename>" ["<arguments>"];

- starts program specified by <filename> with optional arguments or opens specified document

- examples:

RUN "notepad";

RUN "myprogram.exe" "{RawNumber}";

 

 

SendMail "<from>" "<recipients>" "<subject>" "<message>" ["<cc list>" ["<bcc list>"]];

- sends email from <from> to <recipients> with specified <subject> and <message>

- separate multiple recipients with commas

- optional <cc list> indicates recipients of carbon copies

- optional <cc list> indicates recipients of blind carbon copies (i.e., recipients don't see other recipients)

- SendMail uses the Mail options specified in the Options window

- examples:

SendMail "AscendisCallerID@home.com" "me@work.com" "Call from {Name} at {Number}" "";

SendMail "computer1@home.net" "myPager@pagerEmail.com" "Important Call" "Call from {Name} at {Number}";

SendMail "calvin@yahoo.com", "JohnDoe@somewhere.com, JaneDoe@somewhere.com", "Call from {Name} at {Number}";

 

 

SendMailFromFile "<filename>";

- sends email with parameters specified in file <filename>

- if <filename> does not contain a path specification, the Ascendis Caller ID program folder will be used

- The contents of <filename> should be in the following format:

From: <from address>

To: <to address(es)>

Subject: <subject>

<mandatory blank line>

<message lines>

 

Example mail file:

 

From: "Automated System" <nowhere@somewhere.com>

To: Chief@mydomain.com

Subject: Sales Data

 

Today's sales:

--------------

Basic Widgets:   62 units

Advanced Widgets: 24 units

Universal Widgets: 19 units

 

 

- SendMailFromFile uses the Mail options specified in the Options window

- use this command when the mail contents are generated by another program, or the message is longer than one line

- examples:

SendMailFromFile "SalesData.txt";

 

 

ShowMessage "<message>" [WARNING|ERROR|INFORMATION];

- shows a modeless window containing <message> and an OK button

- WARNING, ERROR, or INFORMATION determines which icon to use in the window.  If this parameter is not specified, INFORMATION is used.

- the window will automatically timeout and disappear after 60 seconds

- <message> is logged to the Activity log

- examples:

ShowMessage "Entering untested code";

ShowMessage "{Name} should not be calling here anymore", WARNING;

 

 

Sound "<filename>";

- plays wave file specified by <filename>

- if <filename> does not contain a path specification, the Ascendis Caller ID program folder will be used

- examples:

Sound "C:\WINNT\Media\chimes.wav";

Sound "SpecialRing.wav";

 

 

Speak "<text>";

- speaks specified text if speech support is installed

- examples:

Speak "Someone called";

Speak "Call from {Name} at {Number}";

 

 

Volume <volume>;

- <volume> is between 0 (silence) and 65535 (loudest)

- changes system volume to <volume> for all following Sound and Speak commands in script

- overrides volume settings in Options window, except "Disable sound (including speech) in all actions"

- examples:

Volume 65535;

Speak "Call from {Name}";

 

Hangup;

Volume 1000;

Speak "Hanging up on telemarketer";

 

 

Some commands are also available as Easy Actions.

 

 

Here is a definition of the script language using Backus-Naur format:

<script> ::= <statement_list>

<statement_list> ::= <comment> | <statement> | <statement><statement>

<comment> ::= //<any text to end-of-line>

<statement> ::= <command>;

<command> ::= <DeleteCall command> |

<Export command> |

<HangUp command> |

<Log command> |

<LogActivity command> |

<Run command> |

<SendMail command> |

<SendMailFromFile command> |

<ShowMessage command> |

<Sound command> |

<Speak command> |

<Volume command>

<DeleteCall command> ::= DELETECALL

<Export command> ::= EXPORT CALLS|CONTACTS|ACTIONS [,] CSV|HTML [,] <filename>

<HangUp command> ::= HANGUP

<Log command> ::= LOG <log filename> [,] <log text>

<log filename> ::= <string>

<log text> ::= <log text>

<LogActivity command> ::= LOGACTIVITY <log text>

<Run command> ::= RUN <program filename> [<program arguments>]

<SendMail command> ::= SENDMAIL <from> [,] <recipients> [,] <subject> [[,] <message> [[,] <cc list> [[,]<bcc list>]]]

<from> ::= <string>

<recipients> ::= <recipient list>

<recipient list> ::= "<recipient>" | "<recipient> ; <recipient>"

<subject> ::= <string>

<message> ::= <string>

<ccList> ::= <recipient list>

<bccList> ::= <recipient list>

<SendMailFromFile command> ::= SENDMAILFROMFILE <mail filename>

<ShowMessage command> ::= SHOWMESSAGE <message> [[,] [WARNING|ERROR|INFORMATION]]

<Sound command> ::= SOUND <sound filename>

<Sound filename> ::= <string>

<program filename> ::= <string>

<program arguments> ::= <string>

<Speak command> ::= SPEAK <speak text>

<speak text> ::= <string>

<string> ::= " <any characters except double quote, linefeed, and carriage return> "

<Volume command> ::= VOLUME <integer>

 

 

Ascendis Caller ID supports a limited number of predefined macros.

 

 

You may find more information on specific script commands by browsing or searching the Ascendis Caller ID forums on our web site.