(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: PREV, next: GET_DISPLAY_ATTR)


VMS_SMG_GET_CHAR_AT_PHYSICAL_CURSOR - Return Character at Cursor

Returns the character at the current physical cursor position.

Format:

    character_code = vms_smg.get_char_at_physical_cursor (pasteboard_id)
Returns:
character_code
The character's ASCII code.
Arguments:
pasteboard_id
The pasteboard from which to retrieve the character.
Examples:
>>> import vms_smg
>>> import vms_smgdef

>>> # create a new DECwindows terminal using SMG
>>> status, pasteboard_id, number_of_pasteboard_rows, \
... number_of_pasteboard_columns, type_of_terminal,   \
... device_name = vms_smg.create_pasteboard           \
...   (None, vms_smgdef.SMG_M_WORKSTATION)
>>>

>>> # create virtual display 1
>>> status, vtdpy1 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

>>> # paste virtual display 1
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy1, pasteboard_id, 3, 5, None)
>>>

>>> # write to virtual display 1
>>> status = vms_smg.put_chars (vtdpy1, 'V1', 0, 0)
>>> status = vms_smg.put_chars (vtdpy1, 'TXT', 2, 2)
>>>

Screen layout, file: VMS_SMG_006.JPG

(picture VMS_SMG_006.JPG)

>>> # move cursor within the virtual display (above '1')
>>> vms_smg.set_cursor_abs (vtdpy1, 1, 2)
>>>
>>> character_code = vms_smg.get_char_at_physical_cursor (pasteboard_id)
>>> print character_code, chr(character_code)
49 1
>>> # move cursor within the virtual display (above 'X')
>>> vms_smg.set_cursor_abs (vtdpy1, 2, 3)
>>>
>>> character_code = vms_smg.get_char_at_physical_cursor (pasteboard_id)
>>> print character_code, chr(character_code)
88 X
>>>

(go to: table of contents, index, list of vms_smg, prev: PREV, next: GET_DISPLAY_ATTR)

10-SEP-2000 ZE.