Memory.GetStructureData

variant Memory.GetStructureData ( 

number  Structure,

number  Index,

number  Dimension,

string  StructureForm )

Description

Get one field of your structure.

Parameters

Structure

(number) Address of your structure (returned number from Memory.CreateStructure).

Index

(number) Index of field that you want filled with value.

Dimension

(number) Index of your fileds this arg is optional and used it just when your index refrenced to a field that is multi dimension [] for examp (int[50]) else leave it zero or anything (See Example 2).

StructureForm

(string) Set Structure Form for structure that you created (this arg is optional).

Returns

(variant) Return value that stored in that position of structure(if you create a field int64 this func returns string instead of number).

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

Example 1

struct = Memory.CreateStructure("long, long, long") Memory.SetStructureData(struct, 1, 50) Memory.SetStructureData(struct, 2, 23) Memory.SetStructureData(struct, 3, 51) Dialog.Message("Must Be 23", Memory.GetStructureData(struct, 2, 0)) Memory.FreeStructure(struct)

Example 2

struct = Memory.CreateStructure("long[3]") Memory.SetStructureData(struct, 1, 1, 50) Memory.SetStructureData(struct, 1, 2, 23) Memory.SetStructureData(struct, 1, 3, 51) Dialog.Message("Must Be 23", Memory.GetStructureData(struct, 1, 2)) Memory.FreeStructure(struct)

See also:  Related Actions

Сайт управляется системой uCoz