Dim tables and save the dates

Find quick help here to get you started with Hollywood
Post Reply
User avatar
Juan Carlos
Posts: 410
Joined: Mon Sep 06, 2010 1:02 pm
Location: Palencia
Contact:

Dim tables and save the dates

Post by Juan Carlos » Tue Oct 13, 2015 1:20 pm

Hi, I'm working with an app to read the mouse x and y positions from 7 elements on a picture and I want save this x and y points in a dim table with the seven elements with its two x and y positions but I don't know how programmed this table with Table[Element Number] [Position X][ Position Y] and save this content in a file and read this file to positioning the elements everytime that I load the picture, how is programmed?

User avatar
airsoftsoftwair
Posts: 2481
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Dim tables and save the dates

Post by airsoftsoftwair » Thu Oct 15, 2015 10:46 pm

The syntax is:

Code: Select all

t = {}
For Local k = 0 To 6 Do t[k] = {x = ..., y = ...}
Then you can access it like this:

Code: Select all

DebugPrint(t[5].x, t[5].y)   ; dump position of element 6

User avatar
Juan Carlos
Posts: 410
Joined: Mon Sep 06, 2010 1:02 pm
Location: Palencia
Contact:

Re: Dim tables and save the dates

Post by Juan Carlos » Fri Oct 16, 2015 11:05 am

Thanks Andreas now I work to save the dates in a file.

Post Reply