Vizrt Set x and y coordinates to .txt file

dim x, y as Integer

sub OnInitParameters()
    RegisterPushButton("action", "Get Childs position x y", 1)
end sub

sub OnExecAction(buttonId As Integer)
    dim n As Integer
    dim StreamText as String
    dim TextPath as String = "<full path of .txt file>"
    for n = 1 To this.ChildContainerCount
        dim c as Container = this.GetChildContainerByIndex(n-1)
        c.GetScreenPositionOrtho(x, y)
        StreamText &= x & ";" & y & "\n"
        'println str
    next
    system.SaveTextFile(TextPath, StreamText)
end sub

 

Shopping Cart