Can someone explain to me why the offset function is returning the same offset when the search criteria is different?

Put this into a button:

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
   put offset(tStart,temp1) into tThumbstart
   put offset(tEnd,temp1) into tThumbEnd
   answer "Start:" && tThumbstart & cr & "End:" && tThumbEnd
end mouseUp

I get 4,4.   Is this not the way to search thru binary data?

-= Mike


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to