Re: Binary files inconsistency

2010-05-25 Thread stephen barncard
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 bvla...@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@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
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Binary files inconsistency

2010-05-24 Thread Bill Vlahos
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Binary files inconsistency

2010-05-24 Thread Jim Sims

On May 25, 2010, at 7:44 AM, Bill Vlahos wrote:

 
 The saved Pages or Keynote files have zero length. Why is that and how do I 
 make this work with any file?
 

Aren't those actually folders and not simply files?

Would that affect what you are trying to do?

sims





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