ns=2;s=DEPRAG Smart/Local/MouseFunctions/GetMousePositionOfLastClick
Returns the position of the mouse when a mouse button was last pressed. The prerequisite for this is that the detection of the position was previously activated via the "StartDetectingMouseClick" function.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bMouseFunctionsGetMousePositionOfLastClick : BOOL;
OutputDataMouseFunctionsGetMousePositionOfLastClick : ST_GetMousePosOutputData;
hrMouseFunctionsGetMousePositionOfLastClick : HRESULT;
fbMouseFunctions : FB_MouseFunctions;
END_VAR
hrMouseFunctionsGetMousePositionOfLastClick := fbMouseFunctions.GetMousePositionOfLastClick(
bExecute := bMouseFunctionsGetMousePositionOfLastClick,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
OutputData => OutputDataMouseFunctionsGetMousePositionOfLastClick);
IF hrMouseFunctionsGetMousePositionOfLastClick <> S_FALSE THEN
bMouseFunctionsGetMousePositionOfLastClick := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".