HI_From_Clipboard

HI_From_Clipboard

%HI_From_Clipboard function


Function

The function inserts the Clipboard content to the specified entire local variable or its column.

Declaration

%HI_From_Clipboard( HBJ out _struct | _struct^Col [, TEXT in timeMask] )

Parameters

_struct

Reading the Clipboard content to the whole local variable of Record type.

_struct^Col

Reading the Clipboard content to one row of the local variable.

timeMask

Optional parameter - mask for reading values of Absolute time type.

Description

The function reads the Clipboard content (inserted by the function %HI_To_Clipboard), then converts it to the values of the local variable. If there is defined a column name, the function only converts the first row from the Clipboard to the specified column of the local variable. Otherwise, the function converts as many columns as the local variable comprises of.
Missing columns are replaced by invalid values. If the structure in the Clipboard contains more columns than the local variable, the surplus columns will be ignored. When needed, the function can resize the structure.
Columns in the Clipboard are horizontal tab-separated.

Note

If the parameter timeMask:

  • is not specified - the conversion uses the text mask dd.mm.rrrr hh:mm:ss

  • is specified and differ from the mask "" (empty mask) - the conversion uses the mask specified by the parameter timeMask

  • is the mask "" (empty mask) - the conversion of absolute time and real values uses the settings specified in the Regional and Language Options of the current user

If the time components hh, mm or ss are missing, they are to be replaced with 0.

Example

ENTRY IMPORT_OnClick INT _rows INT _cols ; detection of the structure size placed in Clipboard _rows := %HI_Get_Clipboard_Rows() _cols := %HI_Get_Clipboard_Cols() IF _rows=0 | _cols=0 THEN ; Clipboard is empty ELSE ; reading the column 1 from Clipboard and copying into the column 'Real' %HI_From_Clipboard(_recFrom^Real, "") ; or reading as many columns as the variable _recFrom has %HI_From_Clipboard(_recFrom\HBJ, "") ENDIF END IMPORT_OnClick