CallClerk - Passing call information into another program

With CallClerk you can relay the information about an incoming call, for example the caller's name and number, into other programs.

This may be done either as soon as the caller id information is received, or via a proxy program called 'ccLauncher' which lets you determine if and when the call information is relayed.

For information on how to relay the call information immediately into another program please refer to CallClerk - Settings - Run Program.

Using ccLauncher

ccLauncher is a program designed to allow you to decide if and when information related to an incoming call should be passed into another program.

This is especially handy as calls arrive unexpectedly and you may or may not want to run another program when that happens.

CallClerk and ccLauncher work together to pop-up a window that identifies the caller's name and number as well as the time associated with the call. This window also gives you the choice of either continuing to run another program, or simply exiting and doing nothing. Here is what the ccLauncher window looks like:
   ccLauncher

ccLauncher

ccLauncher is set up via the CallClerk - Settings - Run Program window.  Here's how:

1. on the CallClerk - Settings - Run Program Window, in the 'Program' field, enter "ccLauncher" (without the quotes)

2. on the CallClerk - Settings - Run Program Window, in the 'Arguments' field, enter the following:

        button="Text to Show on main button"
        the path and file name of program to run
        followed by the pipe character (" | ")
        followed by the arguments to be passed in

        for example:
                    button="OK" c:\windows\notepad.exe | %Unformatted Number%.txt

Here is an example:

   CallClerk - Settings - Run Program


In the above case, when a call arrives the ccLauncher window will pop-up. Following this you can chose to either (in the example above) click the OK program to run the notepad program passing to it the information you have defined, or to simply do nothing by clicking on the 'X' to exit the ccLauncher window.

Advanced Usage

The above example, and those shown at CallClerk - Settings - Run Program, illustrate how to pass information into a program that accepts command line parameters.

However, in some cases you may want to pass call information into another program which has not been designed to receive information in this way.

For example, you may want to have a caller's phone number passed into a customer database program, however information into that program is normally just entered via the keyboard.

If this is the case CallClerk may still be able to help you out, however setup is a little more complex. The following explains what you will need to know, as well as how to set it up:

What you need to know

First, you need to know the path and file name of the program you want to run. For example

c:\program files\some directory\someprogram.exe

Second, you need to know keystroke by keystroke, how you would enter the information you want CallClerk to atomically provide your other application. For example you might want to start the program and then enter:

Function Key 7
Tab
Tab
The last seven digits of the phone number

Finally, you need know the title of the window that you want the information passed into. Please note a Window's title is seen at the very top of the Window - to the left of the minimize, maximize and close buttons.

What you need to do

Next, you will need to create a visual basic script file similar to the file keyingscript.vbs found in the program folder in which CallClerk is installed (the contents of which are shown at the bottom of this web page).

The example script contains instructions for tailoring it to suite your needs.

Once created, save that script file someplace on your hard drive.

Finally, set the CallClerk - Settings - Run a program to invoke ccLauncher and to pass into it the information you would like keyed into your other program. Here is an example:

Additional Notes:

Keys you can send:

Key Code                             Key Code
A to Z                                     A to Z
0 to 9                                     0 to 9 
F1  to F16                             {F1} to {F16}
Backspace                            {BACKSPACE}, {BS}, or {BKSP}               
Break                                      {BREAK}                   
Caps Lock                            {CAPSLOCK}
Del or Delete                       {DEL} or {DELETE}
Down Arrow                       {DOWN}
End                                         {END}
Enter                                      {ENTER}
Esc or Escape                      {ESC}
Help                                        {HELP}
Home                                     {HOME}
INS or INSERT                    {INS}
Left Arrow                           {LEFT}
Num Lock                             {NUMLOCK}
Page Down                           {PGDN}
Page Up                                {PGUP}
Print Screen                       {PRTSC}
Right Arrow                       {RIGHT}
Scroll Lock                         {SCROLLLOCK}
Tab                                         {TAB}
Up Arrow                             {UP}

To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:
SHIFT +
CTRL ^
ALT %

For example ^C represents pressing the CTRL and 'C' keys together at the same time.

Contents of CallClerk's keyingscript.vbs example file:

' CallClerk test key entry script
' Copyright Rob Latour 2014 All Rights Reserved
' for more information please see: https://www.callclerk.com/phone/hlpCallClerkccLauncher.html

' This is example vbs script which illustrates how to pass information from CallClerk and ccLauncher
' into another program, as if you had keyed it on a keyboard

' In this example, information is passed into Microsoft's Calculator program.
' Although this would be unlikely useful in an ongoing practice, it provides for a good learning example

' do not change the next ten lines of code; they are used to pass information into this script


set iArgs=wscript.Arguments
dim KeysIn

if iArgs.Count = 1 then
KeysIn = iArgs(0)
else
KeysIn = iArgs(0)
for x = 1 to iArgs.Count - 1
KeysIn = KeysIn & " " & iArgs(x)
next
end if

' do not change the next line of code, it is used as part of initialization

Set objShell = WScript.CreateObject("WScript.Shell")

' the next line of code can or can not be commented out
' to comment it out you just need to begin it with a single quote, as was done with this comment line
' if you do not comment it out the program identified will be started when this script is run
' if you do comment it out, the program will be assumed to be running when this script is run
' please note, the name of the program, surrounded by quotes is the full path and program name of the
' program you want to run


objShell.Run "C:\Windows\System32\calc"

' if you have commented out the above line, you can comment out the line below as well
' it is used to provide a brief pause allowing time for the program identified above to start
' the number 500 represents the number of milliseconds associated with the pause
' 1000 milliseconds = 1 seconds, 500 milliseconds (as identified in the line below) represent 1/2 second


Wscript.Sleep 500

' do NOT comment this next line of code, it is used to identify the Window title of the program that you
' want information passed into. Please note a Window's title is seen at the very top of the Window -
' to the left of the minimize, maximize and close buttons


objShell.AppActivate "Calc"

' a brief pause

Wscript.Sleep 200

' this is where the information passed into this script from CallClerk is sent to the program you have
' specified as if it had been entered on the keyboard


objShell.SendKeys KeysIn

' the next set of four lines of code illustrate how you can also have additional 'hard coded'
' keystrokes passed in if needed you can add similar lines any place after the line of code
' which contains the objShell.AppActivate command (as above)


' Wscript.Sleep 100
' objShell.SendKeys "2"
' Wscript.Sleep 100
' objShell.SendKeys "{ENTER}"

' for more information on keystrokes you can use, please see:
' https://www.callclerk.com/phone/hlpCallClerkccLauncher.html
 
Copyright © 2004 - 2024 Rob Latour.  All Rights Reserved. Thanks to OS Templates