Binary files inconsistency

stephen barncard stephenREVOLUTION2 at barncard.com
Tue May 25 03:00:08 EDT 2010


Different than other file systems. Pages and keynote documents are not files
but packages with many files inside. MacOS Finder abstracts them as
application or document units but they must be handled differently.
This is also true for complex textedit documents (.rtfd) and some documents
saved by EyeTv, iMovie, etc.



On 24 May 2010 22:44, Bill Vlahos <bvlahos at mac.com> wrote:

> The next version of InfoWallet will support attaching files that are
> compressed and encrypted when stored. I've noticed that it works correctly
> with some files but not others.
>
> The script below takes a binary file, compresses it, decompresses it, and
> then saves it back to disk. I've skipped the encryption part for this recipe
> because it behaves the same way. It works correctly with .jpg, pdf, and .doc
> files but not .pages or keynote. Make a new stack and put the following
> script in a button.
>
> on mouseUp
>   answer file "Select a file:"
>   if it is not empty then
>      put it into lFileToRead
>      put URL ("binfile:" & lFileToRead) into vFile
>      put compress(vFile) into vFile
>      set the itemdelimiter to tab
>      ask file "Select destination to save file:" with the last item of
> lFileToRead
>      if it is not empty then
>         put it into vFilePath
>         put decompress(vFile) into vFile
>         put vFile into URL ("binfile:" & vFilePath)
>         set the filetype to ""
>      end if
>   end if
> end mouseUp
>
> The saved Pages or Keynote files have zero length. Why is that and how do I
> make this work with any file?
>
>
> Bill Vlahos
> _________________
> InfoWallet (http://www.infowallet.com) is about keeping your important
> life information with you, accessible, and secure.
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
-------------------------
Stephen Barncard
San Francisco



More information about the Use-livecode mailing list