Archive for November, 2006

Integrating CardScan into your Domino applications

product example 

CardScan is very handy scan-device for managing your business-cards on your computer. In order to let Windows recognize the product the software delivered with the product installs a driver and a program to manage your scanned cards.

Via the Intellisync software you can replicate your contacts to your local address book. The support site says that you can ONLY replicate to the names.nsf file. Other database filenames it will not accept.

But what if you want to use the scan-device in your Domino application, for example a database that collects first contact details for your CRM application?

Okej, you COULD rename your real names.nsf database and name your CRM application names.nsf and give the form that collects the user details the name Contact. But you DON’T want this because this would screw up your initial Notes setup.

cssdk32.dll

So what are your other options? The CardScan software did install a DLL file, right? Why not use the same DLL that the CardScan program uses in your Domino application?

CardScan Software Developers Kit

The CardScan Software Developers Kit (SDK) is a product for software developers. It provides programmatic access to CardScan’s business card recognition capabilities. Using the SDK you can control the Corex scanner, acquire card images, process them one at a time or in batch, and retrieve the results sorted into fields like Name, Title, Company, Street Address, City, State, and Zip Code.

Example initialization in LotusScript

Const Cardscan_SUCCESS = 1          

‘ 1 = Operation succeeded

‘ Initialize the dynamic link library and register the client application:

Declare Function Cardscan_Init Lib “cssdk32.dll” ( RTKaddress As Long)  As Long

‘ RTKaddress = address to receive RTK handle

Dim intReturn As Integer

intReturn = Cardscan_Init(RTKaddress)

If intReturn <> Cardscan_SUCCESS Then

  Exit Sub

End If

Comments (3)

Re: Collapse a categorized embedded View by default

In a previous article I explained how you can use the user key-events to collapse a categorized embedded View by default

Here is the code for defining the user key-events:

‘ keyboard Constant Value Description

Const KeyDown = 0 ‘ hold selected key down
Const KeyUp = 2 ‘ release selected key

‘ Abbreviation conventions

Const vKLButton = 1 ‘Left mouse button
Const vKRButton = 2 ‘Right mouse button
Const vKCancel = 3 ‘CANCEL key
Const vKMButton = 4 ‘Middle mouse button
Const vKBack = 8 ‘BACKSPACE key
Const vKTab = 9 ‘TAB key
Const vKClear = 12 ‘CLEAR key
Const vKReturn = 13 ‘ENTER key
Const vKShift = 16 ‘SHIFT key
Const vKControl = 17 ‘CTRL key
Const vKMenu = 18 ‘MENU key
Const vKPause = 19 ‘PAUSE key
Const vKCapital = 20 ‘CAPS LOCK key
Const vKEscape = 27 ‘ESC key
Const vKSpace = 32 ‘SPACEBAR key
Const vKPageUp = 33 ‘PAGE UP key
Const vKPageDown = 34 ‘PAGE DOWN key
Const vKEnd = 35 ‘END key
Const vKHome = 36 ‘HOME key
Const vKLeft = 37 ‘LEFT ARROW key
Const vKUp = 38 ‘UP ARROW key
Const vKRight = 39 ‘RIGHT ARROW key
Const vKDown = 40 ‘DOWN ARROW key
Const vKSelect = 41 ‘SELECT key
Const vKPrint = 42 ‘PRINT SCREEN key
Const vKExecute = 43 ‘EXECUTE key
Const vKSnapshot = 44 ‘SNAPSHOT key
Const vKInsert = 45 ‘INS key
Const vKDelete = 46 ‘DEL key
Const vKHelp = 47 ‘HELP key
Const vKNumlock = 144 ‘NUM LOCK key

‘KeyA Through KeyZ Are the Same as Their ASCII Equivalents: ‘A’ Through ‘Z’

Const vKA = 65 ‘A key
Const vKB = 66 ‘B key
Const vKC = 67 ‘C key
Const vKD = 68 ‘D key
Const vKE = 69 ‘E key
Const vKF = 70 ‘F key
Const vKG = 71 ‘G key
Const vKH = 72 ‘H key
Const vKI = 73 ‘I key
Const vKJ = 74 ‘J key
Const vKK = 75 ‘K key
Const vKL = 76 ‘L key
Const vKM = 77 ‘M key
Const vKN = 78 ‘N key
Const vKO = 79 ‘O key
Const vKP = 80 ‘P key
Const vKQ = 81 ‘Q key
Const vKR = 82 ‘R key
Const vKS = 83 ‘S key
Const vKT = 84 ‘T key
Const vKU = 85 ‘U key
Const vKV = 86 ‘V key
Const vKW = 87 ‘W key
Const vKX = 88 ‘X key
Const vKY = 89 ‘Y key
Const vKZ = 90 ‘Z key

‘ Key0 Through Key9 Are the Same as Their ASCII Equivalents: ‘0′ Through ‘9

Const vK0 = 48 ‘0 key
Const vK1 = 49 ‘1 key
Const vK2 = 50 ‘2 key
Const vK3 = 51 ‘3 key
Const vK4 = 52 ‘4 key
Const vK5 = 53 ‘5 key
Const vK6 = 54 ‘6 key
Const vK7 = 55 ‘7 key
Const vK8 = 56 ‘8 key
Const vK9 = 57 ‘9 key

‘ Keys on the Numeric Keypad

Const vKnP0 = 96 ‘0 key
Const vKnP1 = 97 ‘1 key
Const vKnP2 = 98 ‘2 key
Const vKnP3 = 99 ‘3 key
Const vKnP4 = 100 ‘4 key
Const vKnP5 = 101 ‘5 key
Const vKnP6 = 102 ‘6 key
Const vKnP7 = 103 ‘7 key
Const vKnP8 = 104 ‘8 key
Const vKnP9 = 105 ‘9 key
Const vKMultiply = 106 ‘MULTIPLICATION SIGN (*) key
Const vKAdd = 107 ‘PLUS SIGN (+) key
Const vKEnter = 108 ‘ENTER (keypad) key
Const vKSubtract = 109 ‘MINUS SIGN (-) key
Const vKDecimal = 110 ‘DECIMAL POINT(.) key
Const vKDivide = 111 ‘DIVISION SIGN (/) key

‘ winFunction Keys

Const vKF1 = 112 ‘F1 key
Const vKF2 = 113 ‘F2 key
Const vKF3 = 114 ‘F3 key
Const vKF4 = 115 ‘F4 key
Const vKF5 = 116 ‘F5 key
Const vKF6 = 117 ‘F6 key
Const vKF7 = 118 ‘F7 key
Const vKF8 = 119 ‘F8 key
Const vKF9 = 120 ‘F9 key
Const vKF10 = 121 ‘F10 key
Const vKF11 = 122 ‘F11 key
Const vKF12 = 123 ‘F12 key
Const vKF13 = 124 ‘F13 key
Const vKF14 = 125 ‘F14 key
Const vKF15 = 126 ‘F15 key
Const vKF16 = 127 ‘F16 key

For example:

if you want to define the user key-event to get focus on the embedded View you specify the Page Down & Space keys.

 keyboard_event vKControl , 0, KeyDown, 0
 keybod_event vKEnd , 0, KeyDown, 0
 keybd_event vKEnd , 0, KeyUp, 0
 keybd_event vKControl , 0, KeyUp, 0  
 keybd_event vKSpace, 0, KeyDown, 0
 keybd_event vKSpace, 0, KeyUp, 0  

Leave a Comment