KioWare - Kiosk System Software - Documentation

See All User Docs
KioWare   |   Platform: Windows®   |   Version: 6.8.0

KioWare Design Guide (Programming)

Although KioWare is designed to handle any web content, there are certain design considerations that will optimize the utility and performance of your kiosk application.


Attract Screens

Although most useful for kiosk applications, even a corporate intranet application may want to use attract screens to ensure session control.

A typical kiosk application will have a number of pages that periodically display on the screen when the kiosk is not in use.  Their purpose is to catch a potential user's attention and direct them to the kiosk.  As soon as they initiate user input (touchscreen, mouse or keyboard) then either the Start Page URL (homepage of your application) will display or the Attract Screen URL will become live.  The latter is useful for advertising applications where each attract screen ad doubles as the entry point into the application for more information.

Rather than having to worry about writing code to handle the timers necessary to know when to switch between screens, when the kiosk has been inactive long enough to switch into attract screen mode, and finally to determine which screen to display next, KioWare handles these tasks automatically.  Attract Screens are defined using the Configuration Tool - see KioWare User Guide.

Even if you don't plan to use attract screens, you should still define an inactivity timer.  This way, your application will reset to your home page and can be used to force a new user session.


Title Tags

Although your application is written using HTML and the display of the content is via Microsoft Internet Explorer, the browser is configured so that it doesn't appear to the user to be a browser.  Status bars, toolbars and title bars are not displayed, and scrollbars are optional.  Since the title bar is not displayed, we have leveraged this feature to extend the functionality of our usage logging.  Not only do we log the URL of each page loaded, but we also log the title.  The title can be used to make the analysis of the usage logs more meaningful.  In addition, the title tag can be embedded with optional class information to enable aggregation and separation of log entries.  Note: this feature is only available if you have enabled usage logging - see KioWare User Guide.  The syntax of this title tag becomes:

<title>[class:]title description</title>

For example, in an application that is bilingual and has separate pages for each language, the various title tags could be:

<title>English:Seattle Information</title>
<title>Spanish:Seattle Information</title>
<title>Japanese:Seattle Information</title>

When the titles are processed by KioWare Server, the class information is stripped out of the title and stored separately.  This enables log data to be queried and aggregated by each individual class or by all classes.  For example, you could see how many people looked at the Seattle Information page in English, how many in Spanish, how many in Japanese, and how many overall.

Another way to use the title tags is to embed user information into the log file.  For example, an HR application may want to know who was looking at which pages.  This is easily accomplished using class information.  For example, let's assume the employee has already logged on and their employee ID is stored in a session variable called ‘EmpID'.  The following ASP will create HTML that will log the employee's ID visit on the 401k distribution page:

<title><%=session(EmpID)%>:401k Distribution</title>

Or, say the 401k investment percentages page:

<title><%=session(EmpID)%>:401k Investment Percentages</title>

If you have pages for which you do not wish to display usage statistics, then use No_Display as the class identifier.  For example, if you didn't care to know how many users viewed your privacy statement page:

<title>No_Display:Privacy Statement</title>

An existing application that you are porting to KioWare may, or may not, have title tags that are optimized for usage log analysis, and the determination of whether it is worthwhile to redefine the title tags is entirely yours to choose.  Just remember, if you choose not to, you can always perform your analysis using logged URL data.  It simply may not be as readable as it could be with customized title tags.

Scroll Bars

A typical web application must be designed for the entire universe of hardware and software of its target audience.  Certainly, it can be optimized for a certain display resolution or browser version; however, effort must still be expended to ensure the site displays properly on a cross-section of PCs.  A kiosk application is the exact opposite because you control the PC that hosts the application; therefore, you can define hardware requirements such as the screen resolution and software configuration such as the size of scrollbars (Windows Desktop Display Properties).  Typically in a kiosk application, scroll bars are to be avoided for ease-of-use reasons.  This is especially true for horizontal scroll bars, but also true for vertical scrollbars in a touchscreen only application.  However, when necessary it is important that they be large enough for touchscreen applications.  Note: an alternative to a scrollbar are the scroll up and scroll down buttons in KioWare's toolbar.

Vertical and horizontal scrollbars can be turned on or off using the Configuration Tool - see KioWare User Guide; however, it is important to realize that even if scrollbars are turned off, the browser still reserves screen space to display them.  Essentially, turning scrollbars off merely hides them, but they still take up screen real estate, and you need to take this into account when designing your pages.  If you control the content, you can turn off scrollbars by using the Scroll=no parameter in the HTML Body tag.  Doing this will prevent screen display space being taken by an invisible scrollbar.


Keyboard Filtering

If your kiosk will contain a keyboard, you need to determine which special keys (functions keys, print screen, ctrl, alt, etc) are on the keyboard, which keys are necessary for your application and then use the Configuration Tool (see KioWare User Guide) to lock out the remaining keystrokes.  If the ctrl, alt and delete keys are on your keyboard you will, at a minimum, want to lock out ctrl-alt-delete.  Otherwise, a user could exit to the desktop at will.

Virtual Keyboard

For applications that require keyboard input but there is no physical keyboard, KioWare can provide a virtual HTML popup keyboard.  KioWare ships with several general purpose virtual keyboards that can be modified as is necessary.  The KioWare installed virtual keyboards are located in [InstallDir]/KioWare/virt_kbd/.

Or, a completely different HTML popup virtual keyboard can be used.  There are only a few design rules to follow if creating a custom virtual keyboard.

There are two styles of virtual keyboard:

  • Phrase Input - A virtual keyboard that stores the keys pressed in a textbox on the virtual keyboard and uses an Enter button to close the virtual keyboard and transfer the data back to the application
  • Key Input - A virtual keyboard that immediately transfers the key pressed to the application and after all keys have been pressed uses a Close button to close the virtual keyboard and transfer control back to the application


Phrase Input
  • Current value of INPUT/TEXTAREA element is passed to the virtual keyboard via a querystring variable named: Value.  Ex, ?value=123456789
  • The virtual keyboard must write its results to a INPUT/TEXTAREA element named “Keyboard”.
  • When the virtual keyboard wants to close, it must set an INPUT element (typically hidden) named “CloseMe” to value “yes”.  This element is checked by KioWare after every mouse click on the virtual keyboard.
  • If the INPUT element in the application is a PASSWORD type, the virtual keyboard will be passed a querystring variable named ‘pw' set to a value of 1, so that the virtual keyboard code can read the variable and also display a password textbox.  Ex, ?value=123456789&pw=1


Key Input
  • Virtual keyboard must have a hidden element named "EchoMe" or "UpdateMe" set to a value of "yes" to enable this Key input mode.
  • The virtual keyboard will write the character pressed to the HTML texbox or textarea in the application that has focus.
  • When the virtual keyboard wants to close, it must set an INPUT element (typically hidden) named “CloseMe” to value “yes”.  This element is checked by KioWare after every mouse click on the virtual keyboard.
  • KioWare also has the ability to send javascript:onkeypress events to the textbox when a button is pressed in the VK.  To enable this feature, create another input tag with an id of KeyPressEvent and set it's value to "yes".
  • To see examples of these features, use the named keyboard files in the virt_kbd directory as examples.  They have most features turned on by default.

Refer to KioWare Guide for more details on how to configure KioWare to use a virtual keyboard.


TouchScreen Issues

Kiosk applications that do not incorporate a keyboard and trackball and rely solely on a touchscreen for user interaction have special design considerations.  The difference in selection resolution between a trackball pointer and the average fingertip is significant.  Although text size is browser and programmatically configurable, standard browser controls such as combo boxes, radio buttons and checkboxes are only configurable using HTML style sheets, and the default sizes tend toward being too small for the average fingertip.  Changing screen resolution is the only other way of modifying the size of browser controls.  Scrollbar size can be modified by changing the Windows Desktop Display Properties.  Adhering to the following guidelines will help to create an application that minimizes the frustration of your users:

  • Design at the lowest resolution possible to maximize browser control size
  • Modify the default size of controls to increase their size
  • Minimize use of Combo Boxes (<select> tags)
  • Leave plenty of white space between radio buttons and checkboxes
  • Make buttons as large as possible
  • Minimize data entry by providing radio button or checkbox selections

Popup Windows

Pop-up windows are generally identified with unwanted advertising that instantly appears along with the page you requested; and as such have little use in a kiosk application; however, there are more legitimate uses for pop-ups.  For example, the use of a pop-up window to display more information about a particular item on a page; however, even so care must be taken.  The standard pop-up window can only be closed by clicking the X in the upper right corner of the window, and in a pure touchscreen application, this can be cumbersome for all but the most slender fingered of users.  In this case, include a large HTML button that can easily be touched by a finger that executes javascript to close the window.

Another potential problem with pop-ups that is unique to kiosk applications involve abandonment.  If a user opens up a pop-up, and then leaves the kiosk, the pop-up is cluttering the screen and may discourage another user from using the kiosk.  KioWare will automatically close all pop-up windows when the user session ends (either via inactivity timer or security device).

As a general rule, it is best not to use pop-up windows; however, in those instances where their use is warranted to use them only in tightly constrained and limited circumstances.


Phone Calls

Many times, especially in HR or Health and Human Services applications, it is beneficial to give the kiosk user the ability to place a phone call for additional information.  This capability is easily handled within KioWare without any special programming.  Naturally, the PC needs to have an analog modem installed (preferably not a WinModem), as well as an analog phone connection and a handset installed on the kiosk enclosure.

KioWare has two methods for placing phone calls: Title Tag, and Embedded Tag

Title Tag

KioWare allows a phone number to become related to the title tag of a specific URL, and whenever a screen navigation is directed to one of these URLs, a dialog box will appear indicating that the kiosk is placing a phone call and that the user needs to pick up the handset.  KioWare will dial the phone number on the modem, wait until the connection is made, then drop the call leaving the handset directly connected to the phone number dialed.  Finally, navigation to the URL is completed and the page displayed.

There is no limit to the number of phone numbers that the kiosk can dial.  All of the necessary information is entered using the Configuration Tool - see KioWare User Guide.  There are three pieces of information that need to be entered to define a phone call:

Phone Call Name

A descriptive name (ex, Human Resources Department) that will be displayed to the user to confirm who they are calling.

Phone Call Number

The phone number to be dialed by the modem.  ex, 18005551212, or in the case where a prefix number must be dialed to access an outside line: 9,18005551212

Phone Call Title Tag

The title tag of the URL that will initiate the phone call.

Embedded Tag

When enabled, KioWare will search each page for a <KIOWAREDIALER> HTML tag, and when one is found will display the dialog message and phone number defined in the tag.  For example:

<KIOWAREDIALER MSG="Calling KioWare" PN="9,17178434790">

Where:

MSG = A descriptive message that will be displayed in the calling dialog box
PN = The phone number

Survey Data

There are many times that a kiosk application will request information about the user.  Certainly, in the case of a HR application, the user will be entering information about themselves and their benefit selections, but even in a purely informational application there is an interest in learning more about the user – perhaps their demographics.  As the developer of a web application, you have many choices available to you to acquire and store user information.  KioWare also provides a method.

In the KioWare program directory, there is a Microsoft Access 2000 database called UserInfo.mdb that contains a table called tbl_Srvy.  This table can be used to store any data that you wish to collect, and when usage stats are uploaded to the KioWare Server any new records in this table are uploaded too.

Tbl_Srvy contains the following three fields: [srvy_id], [timestamp] and [uploaded].  These fields cannot be modified; however, you are free to add as many additional fields as you wish.  The additional fields are automatically uploaded to the central server; however, if you wish to use the Kiosk Statistics component of KioWare Server to view the data then you will need to configure data labels to match the fields you added.  Refer to KioWare Server User Guide for further instructions.


Input Devices

KioWare provides an easy method of getting data that has been acquired via a barcode reader, proximity reader or magnetic stripe reader that precludes the need to develop code to talk directly to the device.

Barcode Scanner If your application makes use of a barcode scanner, then KioWare can be used to integrate that scanner into your application.  Essentially, KioWare is constantly waiting for the scanner to announce that it has scanned data.  When that occurs, KioWare redirects to a previously defined URL (refer to Input Navigate Page on the External Devices tab in the Configuration Tool) passing the barcode data as either form or querystring data (see HTTP Data Methods below).

For example, if the Input Navigate Page is defined as barcodeLookup.asp, and the scanner reads a value of ‘123456789', then KioWare would navigate to barcodeLookup.asp with the following URL:

barcodeLookup.asp?dataItem0=123456789

Code (javascript, VBScript, etc.) in barcodeLookup.asp would read the data and then perform an operation such as looking up information in a database based on the barcode data.

Proximity Card Reader

If your application makes use of a proximity card reader then KioWare can be used to integrate that scanner into your application.  Essentially, KioWare is constantly waiting for the reader to announce that it has read data.  When that occurs, KioWare redirects to a previously defined URL (refer to Input Navigate Page on the External Devices tab in the Configuration Tool) passing the card data as either form or querystring data (see HTTP Data Methods below).

For example, if the Input Navigate Page is defined as cardProcess.asp, and the reader reads a value of ‘123456789', then KioWare would navigate to cardProcess.asp with the following URL:

cardProcess.asp?dataItem0=123456789

Code (javascript, VBScript, etc.) in cardProcess.asp would read the data and then perform an operation such as looking up information in a database based on the barcode data.

MSR Reader

If your application makes use of a Magnetic Stripe Reader, then KioWare can be used to integrate that reader into your application.  Essentially, KioWare is constantly waiting for the reader to announce that it has data.  When that occurs, KioWare redirects to a previously defined URL (refer to Input Navigate Page on the External Devices tab in the Configuration Tool) passing the MSR data as either form or querystring date (see HTTP Data Methods below).

For example, if the Input Navigate Page is defined as msrReader.asp, then up to three stripes of data can be passed with the following syntax:

msrReader.asp?dataItems=3&dataItem0=stripe1Data&dataItem1=stripe2Data&dataItem2=stripe3Data

Where

dataItems = number of stripes read
dataItem0 = stripe 1 data
dataItem1 = stripe 2 data
dataItem2 = stripe 3 data

Code (javascript, VBScript, etc.) in msrReader.asp would read the data and then perform an operation such as processing a credit card transaction.

HTTP Data Methods

KioWare can pass barcode and MSR data either via HTTP Get or Post methods (refer to Navigate Page Data Via on the External Devices tab in the Configuration Tool).  The Get method passes the data as a querystring and is not generally recommended since the data will be visible to server logs, etc.  The Post method passes the data as form data and in combination with encryption is a very secure means of passing the data.


User Sessions

Often times in applications that are not purely informational, the user will be required to logon (ex, employee benefits selection application), and the application designer needs to make sure the user session expires in a timely fashion.  If the session timeout value for the web server is set longer than the timeout value for the attract screens to display (Inactivity Time in the Configuration Tool), then it is very important for the web application to log out the user when the attract screens display.  This is easily accomplished by using Session End Settings in the Attract Screen Tab of the Configuration Tool.  It may also be beneficial to use a security device such as security mat or proximity switch to initiate and end a user session.

The Session End Settings can also run a custom script and also trigger the automatic deletion of cookies, cache and print spooler queue.


Depending on the confidentiality of the information, it may make sense to require the user to logon to each screen of information displayed or every time data is saved.


Error Handling

KioWare can intercept web server errors and redirect to a defined error handling URL (refer to the Error Handling Tab of the Configuration Tool).  In addition, KioWare can pass into the error handling script the URL of the script causing the error and the server error code.  This information is passed using a querystring of the form:

?url=[filename]&status_code=[error number]

With the information contained in the querystring, an error handling routine can be created that elegantly recovers from the error, provides a consistent user interface to the user, and perhaps logs the error for follow-up.

Page Blocking Information

To get a string containing the URL of the last blocked page, use:

window.external.KioLastBlockedUrl

Scripting

The following KioWare functions that can be accessed through scripting within your application.

KioWare.js Wrapper

Most of our JavaScript functions are defined in this convenient KioWare.js wrapper file for use in your projects.  Note that not all functions pertain to all versions of KioWare.


Execute an Exe


window.external.Execute('FullPathToFile');

Where:

  • The page or domain running the executable MUST be defined in Scripting Access.
  • In javascript, backslashes must be doubled up to escape '\'; Ex: (C:\\aDir\\aProgram.exe).

VERY IMPORTANT: Execute will not work unless you have a Scripting Access list set up and your domains or pages added to the list.

User Agent

For applications that need to be able to differentiate between a user running a normal browser and a user running KioWare, the default user agent property has the string 'KioWare' along the KioWare exe version number appended to it.  The application can parse the user agent property for the string 'KioWare' and/or the version number and then act accordingly.  An ASP.Net VB example:

dim strUserAgent as string
dim foundAt as long
strUserAgent = Request.ServerVariables("HTTP_USER_AGENT")
Response.Write(strUserAgent + "<br>")
foundAt = instr(strUserAgent, "Kioware")
if foundAt > 0 then

else
Response.Write("Kioware not found")
end if


External Navigation Commands

For applications that have hardware or software operating external to KioWare that need to perform navigation functions, there is an external executable that can be run to perform browser navigation.  The preferred method is to pass the type of navigation on the command line as follows:

  • Navigate Back: KiowareCmd.exe /b
  • Navigate Forward: KiowareCmd.exe /f
  • Navigate Home: KiowareCmd.exe /h
  • Navigate Logoff: KiowareCmd.exe /l

Example

<a href="javascript:window.external.Execute('KiowareCmd.exe /b');">KioWare Go Back</a>
What is written in quotes, can also be assigned to a custom button on the KioWare toolbar.


If for some reason you are not able to use command line arguments, the you can copy/rename KioWareCmd.exe to the following:

  • Navigate Back: KioCmdBack.exe
  • Navigate Forward: KioCmdForward.exe
  • Navigate Home: KioCmdHome.exe
  • Navigate Logoff: KioCmdLogoff.exe

KioWareRestart.exe

This program will perform a KioWare restart.  It restarts every component of KioWare except the browser window.


Printing

You can force the equivalent of a KioWare Toolbar print command.  This will perform a Javascript print command without displaying the Javascript print dialog box.  The syntax is:

window.external.print()

Logoff

You can force the equivalent of a KioWare Toolbar logoff command.  This will end the user session as if the user had selected the Logoff button in the KioWare toolbar.  The syntax is:

window.external.logoff()

Second Monitor URL

To programmatically change the URL that the second monitor is displaying, use the following syntax:

window.external.Browser(2).parentWindow.location.href = 'http://www.yoursite.com/yourpage.html'

Notes: You MUST set up at least one secondary monitor attract page, otherwise the function will throw a script error.  The second monitor timer will not reset when the URL is changed, so you probably want to use the Second Monitor Display Timer function to reset the timer.

Second Monitor Display Timer

Use this function to programmatically change the time that the second monitor URL is displayed.  This is particularly true when programmatically changing the second monitor URL because the timer is not reset when this occurs.

window.external.Browser(2).parentWindow.external.SecondaryTimer(time)

Where:
time > 0 Sets timer to value (seconds)
time = 0 Stops timer, URL will display continuously
time < 0 Changes timer back to default set in Configuration Tool

Close All Popups

Used to close all open popup windows.

window.external.CloseAllPopups()

Query KioWare Properties


window.external.getKioProperty(KioWareProperty)

Where KioWareProperty is:
StartPage - returns the start page URL.
SVNRev - returns the KioWare SVN version.
ExePath - returns the path to the KioWare executable.
Site - returns the KioWare Server Site name.
Kiosk - returns the KioWare Server Kiosk name.  In KioWare Lite, the machine hostname will be returned with the remote machine hostname appended in a terminal server environment.
Unit - returns the KioWare Server Unit name.  Can be used with KioWare Lite as well.  It will return the remote machine hostname appended in a terminal server environment.


Detect if Browser is KioWare

Sometimes it is nice to create one set of content that can be served up from your web server to desktop users and users of your kiosk.  One factor in being able to accomplish this is detecting if KioWare is running the content or just a normal web browser.  Below you will see javascript code that will determine if KioWare is displaying the content.

function IsKioWare()
{
	try
	{
		if(window.external.getKioProperty('SVNRev'))
			return true;
	}
	catch(err){}
	return false;
}

Load Virtual Keyboard


window.external.StartVirtualKeyboard();

Note:

  • Focus must be set on a HTML textbox or textarea element

Control Virtual Keyboard Attributes

The virtual keyboard width, height and other attributes can be controlled by each element on your page by putting the element attributes below on your text element.

KioVkPositionThe position mode where:
0 is Centered.
1 is Bottom-Centered.
2 is Top-Centered.
3 is Left-Centered.
4 is Right-Centered.
5 is Custom X/Y.  Note: Origin is bottom-left and coordinate is at the upper-left of the popup window.
KioVkXPosThe custom X position.
KioVkYPosThe custom Y position.
KioVkWidthThe width.
KioVkHeightThe height.
KioVkURLPath to the virtual keyboard file.
KioVkCustomAny custom information you want to pass to the virtual keyboard.

Example:

<input id="userName" type="input" KioVkWidth="800" KioVkHeight="600" KioVkPosition="4"/>

Write a Custom Usage Statistics Entry

Used to write a custom usage statistics entry in the usage statistics database.  Note: if KioWare isn't being used to manage the start and end of user sessions, then see User Session script commands.

window.external.WriteLogEntry(szPageName, szPageURL);

Where:

  • szPageName - a string that will be stored in the page name field of the usage statistics database
  • szPageURL - a string that will be stored in the page URL field of the usage statistics database

User Session

In applications where KioWare isn't used to manage the start and finish of user sessions, scripting must be used to define the start and end of a user session.  This data is necessary for usage statistics to work properly.

At user session start:

window.external.SetSessionBegin();

At user session end:
window.external.WriteEndSessionRecord();


Show a Find Dialog


window.external.FindDialog();

Note:

  • Currently, does not work with Virtual keyboard.
  • When running Explorer as shell and a popup window is open, the Find dialog loses focus after one second.  This behavior does not occur when KioWare is running as shell.

Log an Event

Sometimes it can be helpful to log an event to the event log.  This javascript function will do just that.

window.external.KioEventLog(iType, szMessage);

Where:

  • iType - type of message to log.  (0- information, 1- warning, 2- error)
  • szMessage - a string message

Exit KioWare


window.external.KioExit();

Be careful!  This function will fully EXIT out of KioWare.

VERY IMPORTANT: KioExit will not work unless you have a Scripting Access list set up and your domains or pages added to the list.

URL Substitution Variables

KioWare will dynamically translate special identifiers inline with the settings.  These identifiers include:

$$KIO_KIOSKNAME$$The KioWare Server kiosk name.
$$KIO_UNITNAME$$The KioWare Server Unit name.  In a terminal server environment, this appends the remote hostname to the end in brackets.
Example: UnitName [remoteHost].
$$KIO_SITENAME$$The KioWare Server Site name.

Valid settings that will accept substitution include:

  • XML config URL
  • Start page
  • Error handling URL
  • Custom link buttons
  • Attract URLs and Session end URL
  • Access list redirect page
  • Device input navigate page
  • Multiple monitor settings

Dial a phone number

Have KioWare dial a phone number.

window.external.KioDialNumber(name, number, showDialPad);

Where:

  • name - Description shown to the user when dialing.
  • number - The number to dial.
  • showDialPad - Boolean of whether to allow the user to press digits or not.

Capture Video and Take Picture

This function is used to both capture video footage and take pictures with a configured web cam device.

window.external.KioCaptureVideo ( see table below )

int inputDevice0 means auto, otherwise, is the device number from the External Devices tab.
string filenameA full path or an empty string to use the configured registry settings instead.
uint seconds0 means take a picture, otherwise is the length of time to capture video.
returnsvoid.

Scan an Image

This function is used to scan an image with a configured scanner device.

window.external.KioReadScan ( see table below )

int inputDevice0 means auto, otherwise, is the device number from the External Devices tab.
string filenameA full path or an empty string to use the configured registry settings instead.
returnsvoid.

Monitor a Device in Web Page

Any monitored or input device can be monitored dynamically from your web page in KioWare using the function below:

window.external.KioDeviceStatus ( see table below )

string deviceNameThe device name configured in the Config Tool.  For monitored device on the Server tab this is the Device Name, for input devices on the External Devices tab this is the Profile Name.
returnsAn integer with bits set for querying status.  See below for a full example.

Also see Device Status Monitoring Example.

MEI Bill Acceptor

If you have an MEI bill acceptor and want to use it in KioWare you will need to interact with it through JavaScript using this function:

window.external.KioInputDevice ( see table below )

string deviceNameProfile Name for the device you configured in the Config Tool.
string command

The command you want to execute.

Valid Commands:

Status - Returns true if the device is working or false if not.
Enable - Tell the bill acceptor to accept bills.  No return value.
Disable - Do not accept bills.  No return value.
GetCredits - Returns the current bill count and clears it.
PeekCredits - Returns the current bill count without clearing.

Commands with different behavior in escrow mode:

GetCredits - Returns the value of the bill in escrow or 0 if none.
PeekCredits - Does not make sense; do not call this command in escrow mode.
Stack - Accept the bill which is in escrow.  No return value.
Reject - Reject the bill which is in escrow.  No return value.

returnsVaries by the command you send.

Example Use:

var v= window.external.KioInputDevice("mei1", "GetCredits");

Note: The web page using this functionality should call Status before calling the other functions to make sure the device is not in an error state.  All function calls are fast because KioWare does not contact the device when you call them, but instead has cached values that are used.

CCNet Bill Validator (Acceptor)

Interacting with the CCNet bill validator is just like interacting with the MEI bill acceptor.

SCM Microsystems Contactless Smart Card Reader

If you have a SCM Microsystems Contactless Smart Card Reader and want to use it in KioWare you will need to interact with it through JavaScript using this function:

window.external.KioInputDevice ( see table below )

string deviceNameProfile Name for the device you configured in the Config Tool.
string command

The command you want to execute.

Valid Commands:

HaveData - Returns true if KioWare has data to read from the device.
uid - Returns the card data.
ClearData - Clear KioWare's cache of the data.

returnsVaries by the command you send.

Example Use:

var v= window.external.KioInputDevice("scm", "uid");

Technik Bill Acceptor/Dispenser

If you have a Technik bill acceptor/dispenser and want to use it in KioWare you will need to interact with it through JavaScript using this function:

window.external.KioTechnik ( see table below )

string statusOrCommandMust be Status or Command.  The Status and Command options for the second argument are listed below.
string call

Status Calls:

Status - Should be called first in every poll from your page.
Returns:
0 - Ok.
1 - Out of product.
2 or higher - Fatal error.
-1 - Busy executing the another command.

ColumnStatus - Just like Status except it pertains to a specified column as a third argument to the KioTechnik call.
BAStatus - See Technik docs.
ModeSwitchValue - See Technik docs.
PeekCredits - Returns the current bill acceptor count, but does not clear it.
GetCredits - Calls PeekCredits and clears the count.
SortGateOpen - Check if the sort gate is open.
LowProduct - Check if product is low.
Staged - Check if staged.
ReadDataLength - Get read data length.
Read Data - Get read data.

Command Calls:

BillEnable - Must be called to enable the bill acceptor.  It does not hurt to call if the device is already enabled.
BillDisable - Disables the bill acceptor.
Vend - Performs a vend operation.  Has a third argument for column number.  If the third argument is not specified, any column available is used.  See Technik docs for more information.
Read - See Technik docs.
Outstack - See Technik docs.
Restack - See Technik docs.
LampMask - See Technik docs.  The third argument is the mask.
LCDWrite - See Technik docs.  The third argument is the string.
LCDWrite2 - See Technik docs.  The third argument is the string.

returnsVaries by the command you send.

Example Use:

var st= window.external.KioTechnik("Status", "ColumnStatus", 2);

Important Dip Switch Settings:

Dip switch 1:
1,2,3: off (1 pulse per 1000 rupiah)
4: on (50x100 ms pulse)
5: on (inhibit level active low)
6,7,8,9,10: on (accept 1000, 5000, 10000, 20000, 50000 notes)
Dip switch 2:
1: on (Pulse normal high)
2: on (Pulse mode, not MDB)

LG Bill Dispenser

If you have a LG CDM bill dispenser and want to use it in KioWare you will need to interact with it through JavaScript using this function:

window.external.KioOutputDevice ( see table below )

Note: KioWare will always wait 30 seconds before talking to the device at KioWare start because the device needs warmup time after initialization.

string deviceNameThe device profile name from the Config Tool.
string command
dispenseAttepmts to dispense bills.  Takes 3 integer arguments after the command; these are the count of bills you want dispensed from the high, middle and low cassettes.  For example:
KioOutputDevice("dn", "dispense", highCnt, middleCnt, lowCnt);
test_dispenseJust like dispense, except that all bills are rejected.
dispense_statusReturns an ezCDM specific error code where 0x20 is Ok and anything else is an error.  Specific error codes are listed in the device serial protocol documentation.
dispense_busyReturns true if the device is busy with another transaction.  All other commands will be ignored if the device is busy.
dispense_[high/middle/low]_ejectReturns how many bills were ejected from the last dispense.
dispense_[high/middle/low]_rejectReturns how many bills were rejected from the last dispense.
dispense_[high/middle/low]_pickReturns how many bills were pulled from the last dispense.
purgeAttempts to free any jammed bills by running the motor for 15 seconds.
purge_ejectReturns how many bills were dispensed after a jam.
purge_rejectReturns how many bills were rejected after a jam.
dispense_[high/middle/low]_nearendAttempts to use the undocumented near end sensor to detect if a cassette is low on bills.  Returns true if near end.

Example Use:

var v= window.external.KioOutputDevice("LG Bill", "dispense_middle_eject");

Puloon Cash Dispenser

Interacting with the Puloon cash dispenser is almost exaclty like interacting with the LG bill dispenser.  The only difference is that it returns a Puloon specific error code when you call KioOutputDevice with dispense_status.

Vendapin Card Dispenser

If you have a Vendapin card dispenser and want to use it in KioWare you will need to interact with it through JavaScript using this function:

window.external.KioOutputDevice ( see table below )

string deviceNameThe device profile name from the Config Tool.
string command
dispenseAttepmts to dispense a card.  When the device is not busy, call KioDeviceStatus to check the status of the dispense.  For instance, if a card is jammed, KioDeviceStatus will indicate so.
dispense_busyReturns 1 if dispensing, otherwise 0.
dispense_emptyReturns 1 if empty, otherwise 0.

Example Use:

var v= window.external.KioOutputDevice("Ven Card", "dispense_busy");

Boca Printers

To interact with Boca printers in KioWare, use KioOutputDevice.

window.external.KioOutputDevice ( see table below )

string deviceNameThe device profile name from the Config Tool.
string command
PrintData to send to the printer.
PrinterMessageGets the current printer message.  Note: Call this once before every print to clear the current message.  Call after printing after you poll status for non-busy to get the relevant message.  An example of the printer message is an RFID tag ID that you just queried for using Print.
bool isFragment[optional] Set to 1 if what you are printing is just a fragment of the document you intend to print.  In other words, you will be calling KioOutputDevice again.

Example Use:

window.external.KioOutputDevice("Boca", "Print", "KioWare was here!");

FEIG RFID Module

The FEIG RFID module device is very complicated.  Contact KioWare for more infomation, and an example test page.

Hengstler C-56 Printer

To interact with the Hengstler C-56 printer in KioWare, use KioOutputDevice.

window.external.KioOutputDevice ( see table below )

string deviceNameThe device profile name from the Config Tool.
string command
PrintData to send to the printer.
bool isFragment[optional] Set to 1 if what you are printing is just a fragment of the document you intend to print.  In other words, you will be calling KioOutputDevice again.

Example Use:

window.external.KioOutputDevice("Hengstler", "Print", "KioWare was here!");

Zebra ZPL Printers

To interact with Zebra ZPL printers in KioWare, use KioOutputDevice.

window.external.KioOutputDevice ( see table below )

string deviceNameThe device profile name from the Config Tool.
object command
PrintString data to send to the printer.
PrintBytesArray of bytes to send to the printer.  Each integer in the array MUST be a single byte (less than 256).
bool isFragment[optional] Set to 1 if what you are printing is just a fragment of the document you intend to print.  In other words, you will be calling KioOutputDevice again.

Example Use:

window.external.KioOutputDevice("Zebra", "Print", "KioWare was here!");

FutureLogic Printer

To interact with the FutureLogic printer in KioWare, use KioOutputDevice.

window.external.KioOutputDevice ( see table below )

string deviceNameThe device profile name from the Config Tool.
object command
PrintString data to send to the printer.  Note that a preamble and postamble must be printed first, in accordance with the device documentation:
Preamble:  '^j|^\x1b@
Postamble: \f\x1b[^]\x1b\r\n^c|f|^
PrintBytesArray of bytes to send to the printer.  Each integer in the array MUST be a single byte (less than 256).
bool isFragment[optional] Set to 1 if what you are printing is just a fragment of the document you intend to print.  In other words, you will be calling KioOutputDevice again.

Example Use:

window.external.KioOutputDevice("FutureLogic", "Print", "'^j|^\x1b@KioWare was here!\f\x1b[^]\x1b\r\n^c|f|^");

KioWare .Net Addins Programming

Also see: .Net Addins in Config Tool

KioWare has the ability to load custom written, .Net libraries at runtime.  Addins are a very powerful feature because anything that can be done using the .Net programming language (which is almost anything) can be accomplished.

KioCallObject

The window.external JavaScript function that can be used to call a .Net addin function.

For instance, here is an example of using a .Net addin that was written to enable KioWare to restart the computer:

window.external.KioCallObject("LogoffNS.LogoffClass", "Restart", "optionalParams");

LogoffNSthe .Net namespace in the library.
LogoffClassthe object within the namespace.
Restartthe function to call.
optionalParamshow parameters are passed to the function.  There can be any number of parameters.
returnsvalue of the function that was called.  Has been tested with int and string.

Kioware.Callbacks

Functions that can be called from the .Net addin to perform certain defined tasks in KioWare.

StartTimer ( see table below )

PLEASE USE StartTimer and StopTimer in your .Net addins instead of creating your own timer routines.  KioWare manages these, so they are much safer, especially when your app is multi-threaded.  Note that there is a limit of 30 timers per addin.

uint uMilliSecTime in milliseconds before the callback will be called.
TimerCallback callbackTimerCallback is defined as such: (delegate void TimerCallback(Object ^hpArgument)).
object hpArgumentOptional argument you want to pass to the callback.
returnsAn int holding the timerID.  0 on error.

StopTimer ( see table below )

Stops a timer that was started with StartTimer.

int timerIDThe timer to stop.

EventLog ( see table below )

Logs an event to the event log.

Kioware.EventLogType tType of event.  (Informational, Warning, Error).
string stringMsgMessage text to log.

FireEventOnElement ( see table below )

Triggers any event to occur for any element and sets propertyName to a specified value.

string eventThe JavaScript event name (onclick ...).
string propertyNameArgument to pass to the event.  Accessable in KioWare as window.event.propertyName.
string elementHTML element inside the main browser window to search for.
returnsbool.  false means something went wrong; couldn't find element, etc.

SetElementText ( see table below )

Sets form element text in a specified browser window.

int browserNumberBrowser to set element text for.  0 is the main browser window.
string formElementForm element to search for.
string textWhat to set it's text property to.
returnsbool.

Home ()

Navigates to the configured home page.

Forward ()

Navigates forward in browsing history.

Back ()

Navigates back in browsing history.

Refresh ()

Refreshes the browser page.

Print ()

Prints the browser page without prompting.

Navigate ( see table below )

Navigates to the address specified.

string urlAddress to navigate to.

EndSession ()

Ends the current users KioWare session.

UserPresent ( see table below )

Sets or resets the KioWare inactivity timer.  Can be used to end a users session or extend it.

bool presentIf set to false, acts just like EndSession.  If set to true, resets the inactivity timer as if a user interacted with the kiosk.

ToolbarControlSetBitmap ( see table below )

Sets the image for a Picture control on a specific named toolbar.

string toolbarName of the toolbar.  An empty string means search all toolbars.
string controlName of the Picture control.  A name of "Phone Status" is special - means the phone status pictures, regardless of what they are actually named.
Bitmap bmpThe .Net Bitmap to set the Picture control image to.  Use NULL to hide the control.
returnsbool.

AddinRegistryKey ( see table below )

KioWare will open or create a registry key at [KioWareRegistryKey]\AddIn\hpStringSubKey and return an open RegistryKey for reading and writing.

string hpStringSubKeyKey name below [KioWareRegistryKey]\AddIn to open or create.  This name cannot have a slash.
returnsRegistryKey or null on failure.  One reason this function may fail is that another addin already has that same key open.  Another reason being that hpStringSubKey has a slash.

MessageBox ( see table below )

Shows a message box displaying hpStringMsg.

string hpStringMsgMessage.

OpenModelessDialog ( see table below )

Opens a popup window that can be used to contain custom content.

uint widthWidth of window.
uint heightHeight of window.
Kioware::WindowPos winPosPosition of window.
string hpStringTitleTitle of window.
uint alphaTransparency level of window (0-255).
string hpStringURLURL to load in window.
returnsHandle to the window or 0 on failure.

CaptureVideo ()

See Capture Video.

ReadScan ()

See Scan Image.

Kioware.Events

These functions do the opposite of KioWare.Callbacks in that KioWare.exe calls them to notify the .Net addin of certain events that occur.

OnStartupEvent

Called when KioWare boots.

OnShutdownEvent

Called when KioWare is shutting down.

OnStartSessionEvent

Called when a KioWare session is starting.

OnStartSession2Event

Called when a KioWare session is starting.  Differs from the normal start session event in that a class called StartSession2Args is passed in which includes the current KioWare session GUID.

OnEndSessionEvent

Called when a KioWare session is ending.

OnVolumeButtonEvent

Called when a volume button is pressed on the toolbar.  VolumeButtonEventArgs has a string that contains the name of the control and a bool variable that indicates if the button is up or not.  This event can be handled by the .Net addin and if bEventHandled is set to true, KioWare will not furthur process the event.

OnPageLogEvent

Undocumented.

OnPageErrorEvent

Undocumented.

OnInstallUpdateEvent

Undocumented.

OnPhoneDialerDelegate (PhoneDialerEventArgs)

Called when KioWare is about to dial a phone number.  Can be cancelled.

string hpStringNamename configured for the phone number.
string hpStringPhoneNumberphone number to be dialed.
bool bDialPadis true if the dialpad should be shown.
bool bEventHandled.Net addin programmer should set to true if KioWare should not handle the call.

.Net Monitored Device

These functions are specific to one .Net addin purpose; devices.

OnInputDeviceEvent ( Kioware.InputDeviceEventArgs )

The table below refers to the members of Kioware.InputDeviceEventArgs.

int iDeviceKioWare ID of the device that this message refers to.
int hBrowserID of the browser window that was active at the time of the event.
string urlURL of the browser window at the time of the event.
string[] hpDataData received from the device.
bool fCancelNavigateSet this value to true in order to cancel KioWare navigation to the input device page.

OnInputDeviceEvent2 ( Kioware.InputDeviceEventArgs2 )

Just like OnInputDeviceEvent, except that a new paramerter was added to the args: hpFields.  The new arg is an array of name/value pairs for custom settings.

OnInputDeviceEvent3 ( Kioware.InputDeviceEventArgs3 )

Just like OnInputDeviceEvent2, except that a new paramerter was added to the args: pIHtmlDocument2.  The new arg is an unmanaged pointer to the IHtmlDocument2 interface for the page that KioWare is rendering.  The pointer is only valid during the event and you must be very careful when using it.

KioOpenMonitoredDevice ( see table below )

Called by KioWare when the device is being opened.  If your .Net class supports this device, it should return true, otherwise false.

string DeviceNameKioWare name of the device that this message refers to.
UInt32 DeviceNumberKioWare ID of the device that this message refers to.
UInt32 SubTypeDevice sub type.
UInt32 CommPortConfigured device comm port, if any.
returnsbool.

KioStatusMonitoredDevice ( see table below )

Called by KioWare periodically to notify of the current status.

UInt32 DeviceNumberKioWare ID of the device that this message refers to.
Kioware.MonitoredDeviceStatus Status uGrbit contains device status codes as such:
OffLine 0x0001
CoverOpen 0x0002
LowPaper 0x0004
OutOfPaper 0x0008
NoRecoverError 0x0010
RecoverableError 0x0020
PaperJam 0x0200

Note: A .Net addin will NOT be able to set any other bits other than those listed above.

uExtra is ... extra.
returnsvoid.

KioOpenMonitoredDevice2 ( see table below )

Called by KioWare when the device is being opened.  If your .Net class supports this device, it should return true, otherwise false.

string DeviceNameKioWare name of the device that this message refers to.
UInt32 DeviceNumberKioWare ID of the device that this message refers to.
UInt32 SubTypeDevice sub type.
UInt32 CommPortConfigured device comm port, if any.
Kioware.MonitoredDeviceLimits[] dlArrAn array of MonitoredDeviceLimits.  The limits are taken directly from the registry as strings.  The semantics of the limits are up to the addin.
returnsbool.

KioStatusMonitoredDevice2 ( see table below )

Called by KioWare periodically to notify of the current status.

UInt32 DeviceNumberKioWare ID of the device that this message refers to.
Kioware.MonitoredDeviceStatus2 StatusJust like MonitoredDeviceStatus with an array of MonitoredDeviceValue called hpValues.
returnsvoid.

KioWareDotNet

Everything in this section is found in the KiowareDotNet.dll file in the KioWareDotNet namespace.
Example Use:
window.external.KioCallObject("KioWareDotNet.KioWareDotNet", "functionName", param1, param2);

MessageBox ( see table below )

Shows a KioWare message box.  Use instead of javascript alert() because the KioWare message box is not modal (will not lock up KioWare).

string messageThe message to show in the message box.

get_UserPresent ( see table below )

Checks whether the user is in a KioWare session or not.

returnstrue if a user is present and false if not.

set_UserPresent ( see table below )

Stops and starts a KioWare user session.

bool valIf true, the inactivity timer is reset, and attract mode exits.  If false, the equivalant of a KioWare logoff is done.

Timed Session End Feature

Callbacks found in the TimeLimitedSession class for the timed session end feature.

GetCurrentSecondsRemaining ()

See returns below.

returnsThe number of seconds left in the countdown before the user session will end.

StartTimer ( see table below )

Starts the countdown timer.  This function may ONLY be used if the timed session end feature is turned off in the Config Tool.

int TimerIntervalAmount of time (in seconds) before the user session will end.

StopTimer ()

Stops the countdown timer.

IsManualMode ()

Specifies whether or not the timed session end feature is turned off in the Config Tool.

returnstrue if the session end feature is turned off in the Config Tool.

An Example C# Addin Program

Full C# code that changes a toolbar Picture control image.  Add a Reference to KioWare.exe in order to use the public methods within the module.

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Threading;
using System.Diagnostics;

namespace ToolbarTestNS
{
	public class ToolbarTest
	{
		int curbmp = 1;
		Bitmap bm1;
		Bitmap bm2;
		Kioware.OnShutdownDelegate KiowareShutdown;
		Kioware.OnStartupDelegate KiowareStartup;

		public ToolbarTest()
		{
			KiowareShutdown = new Kioware.OnShutdownDelegate(Events_OnShutdownEvent);
			KiowareStartup = new Kioware.OnStartupDelegate(Events_OnStartupEvent);
			Kioware.Events.OnShutdownEvent += KiowareShutdown;
			Kioware.Events.OnStartupEvent += KiowareStartup;

			bm1 = new Bitmap(@"C:\Inetpub\wwwroot\Skins\0_splash-On.bmp");
			if(bm1 == null)
				EventLog.WriteEntry("ToolbarTest", "Bitmap 1 creation failed");

			bm2 = new Bitmap(@"C:\Inetpub\wwwroot\Skins\0_splash-Disabled.bmp");
			if (bm2 == null)
				EventLog.WriteEntry("ToolbarTest", "Bitmap 2 creation failed");
		}
		~ToolbarTest()
		{
		}
		public void SwapBitmap()
		{
			if (Kioware.Callbacks.ToolbarControlSetBitmap("Toolbar1", "img1", curbmp == 1 ? bm2 : bm1))
			{
				if (curbmp == 1)
				{
					curbmp = 2;
					bm1.RotateFlip(RotateFlipType.Rotate90FlipNone);
				}
				else
				{
					curbmp = 1;
					bm2.RotateFlip(RotateFlipType.Rotate90FlipNone);
				}
			}
			else
				EventLog.WriteEntry("ToolbarTest", "Image set failed");
		}
		void Events_OnStartupEvent()
		{
			System.Diagnostics.EventLog.WriteEntry("ToolbarTest", "Add in started");
		}
		void Events_OnShutdownEvent()
		{
			// close times
			// detach event
			Kioware.Events.OnShutdownEvent -= KiowareShutdown;
			Kioware.Events.OnStartupEvent -= KiowareStartup;
		}
	}
}

The HTML/JavaScript that uses the addin above:

javascript:window.external.KioCallObject("ToolbarTestNS.ToolbarTest", "SwapBitmap");

You may also want to download this full Visual Studio addin example.

Config Tool Addins

See KioWare Config Tool Addin Programming