HALCON Reference Manual 10.0.2
Table of Contents / Graphics / Text ClassesClassesClasses | | | Operators

read_charread_charread_charReadCharReadChar (Operator)

Name

read_charread_charread_charReadCharReadChar — Read a character from a text window.

Signature

read_char( : : WindowHandle : Char, Code)

Herror read_char(const Hlong WindowHandle, char* Char, char* Code)

Herror T_read_char(const Htuple WindowHandle, Htuple* Char, Htuple* Code)

Herror read_char(const HTuple& WindowHandle, char* Char, char* Code)

HTuple HWindow::ReadChar(HTuple* Code) const

void HOperatorSetX.ReadChar(
[in] VARIANT WindowHandle, [out] VARIANT* Char, [out] VARIANT* Code)

BSTR HWindowX.ReadChar([out] BSTR* Code)

static void HOperatorSet.ReadChar(HTuple windowHandle, out HTuple charVal, out HTuple code)

string HWindow.ReadChar(out string code)

Description

read_charread_charread_charReadCharReadChar reads a character from the keyboard in the input window (= output window). If the character is printable it is returned in CharCharCharCharcharVal. If a control key has been pressed, this will be indicated by the value of CodeCodeCodeCodecode. Some important keys are recognizable by this value. Possible values are:

'character':

printable character

'left':

cursor left

'right':

cursor right

'up':

cursor up

'down':

cursor down

'insert':

insert

'none':

none of these keys

Attention

The window has to be a text window.

Parallelization

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Window identifier.

CharCharCharCharcharVal (output_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Input character (if it is not a control character).

CodeCodeCodeCodecode (output_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Code for input character.

Result

read_charread_charread_charReadCharReadChar returns 2 (H_MSG_TRUE) if the text window is valid. Otherwise an exception is raised.

Possible Predecessors

open_textwindowopen_textwindowopen_textwindowOpenTextwindowOpenTextwindow, set_fontset_fontset_fontSetFontSetFont

Alternatives

read_stringread_stringread_stringReadStringReadString, fread_charfread_charfread_charFreadCharFreadChar, fread_stringfread_stringfread_stringFreadStringFreadString

See also

write_stringwrite_stringwrite_stringWriteStringWriteString, set_fontset_fontset_fontSetFontSetFont

Module

Foundation


Table of Contents / Graphics / Text ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH