LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lpav.SetUpCornerAllSelected - Set the upper left corner of a selection rectangle

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

number=lpav.SetUpCornerAllSelected(x,y) ;

Description

Set the x, y position of the upper left corner of a rectangle selection of a group of graphical object.

Parameters

x - The rectangle selection position from the left side of the Active View Area (in pixel)
y - The rectangle selection position from the top side of the Active View Area

Return Values

number - The number of graphical object moved.
Or nil if error

Example

lp_value = 0;
lp_buffer ="error";

dofile(lp.GetPath().."/config/script/loriotinit.lua");

zz=LPAV_OBJ_ANALOGIC_METER_01;
k=0;
lpav.Insert(10,1,10,10,zz);
lpav.SetClipart( lp.GetPath().."/card/vumeters/vumeter8.emf");
lpav.SetSelected();
lpav.Insert(20,1,20,20,zz);
lpav.SetClipart( lp.GetPath().."/card/vumeters/vumeter12.emf");
lpav.SetSelected();
lpav.CopyAllSelected();
lpav.DeleteAll();
lpav.Paste(0);
lpav.SetUpCornerAllSelected(100,10);
lpav.RefreshMap();
lp.Break("pause");
lpav.ClearAllSelected();
lpav.Paste(0);
lpav.SetUpCornerAllSelected(200,10);
lpav.RefreshMap();
lp.Break("pause");
lpav.ClearAllSelected();
lpav.Paste(0);
lpav.SetUpCornerAllSelected(300,10);
lpav.RefreshMap();
lp.Break("pause");
lp_buffer ="ok";
lp.Trace("fin");
lpav.RefreshMap();

lection


www.loriotpro.com