Overview
Compare two memory areas.
(number) Address of Memory1.
(number) Address of Memory2.
(number) Number of Byte that you want compared in both memory block.
(number) Returns 1 if its equal or 0 if it doesn't match.
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.
mem = Memory.Allocate(1024); mem2 = Memory.Allocate(1024); Memory.PutString(mem, "AMSWaves", -1, "Ascii"); Memory.PutString(mem2, "AMSWaveS", -1, "Ascii"); result = Memory.Compare(mem, mem2, 8); -- Set Length to 7 and see Result if result == 1 then Dialog.Message("Compare Memory Result", "Mem1 and Mem2 are Equal"); else Dialog.Message("Compare Memory Result", "Mem1 and Mem2 are not Equal"); end Memory.Free(mem) Memory.Free(mem2)
See also: Related Actions