Overview
Get one field of your structure.
(number) Address of your structure (returned number from Memory.CreateStructure).
(number) Index of field that you want filled with value.
(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).
(string) Set Structure Form for structure that you created (this arg is optional).
(variant) Return value that stored in that position of structure(if you create a field int64 this func returns string instead of number).
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.
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)
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