Offset and Binary Data

Alejandro Tejada capellan2000 at gmail.com
Mon Jan 26 19:16:00 EST 2015


Hi Mike,

After running your script, using Livecode 7.0.1
under Windows my result is 4,10

Maybe, this could help.
Add this line before getting offset:
set the casesensitive to true

to read in this way:

on mouseUp
    put numtochar(255) & numtochar(216) into tStart
    -- in Hexadecimal: FFD8 = SOI(Start of jpeg image)
    put numtochar(255) & numtochar(217) into tEnd
    -- in Hexadecimal: FFD9 = EOI(End of jpeg image)

    put "AAA" & tStart & "DATA"& tEnd & "BBB" into temp1

    set the casesensitive to true

    put offset(tStart,temp1) into tThumbstart
    put offset(tEnd,temp1) into tThumbEnd
    answer "Start:" && tThumbstart & cr & "End:" && tThumbEnd
end mouseUp

Al



More information about the use-livecode mailing list