standalone has plainly readable transcript

Richard Gaskin ambassador at fourthworld.com
Fri Jun 13 17:06:00 EDT 2003


Dar Scott wrote:

>> -- First we turn it into a single line to avoid runtime script
>> limits:
>> put base64encode(tData) into tData
> 
> I think this puts line breaks at 72 characters.  I think the base64
> standard limits lines to 76 characters.  It should do no harm to remove
> all of them, if a single line is really needed.
> 
>> --- tuck it in a script:
>> set the script of someObject to tData
> 
> Will this generate compile errors?
> 
> Maybe if this is commented with /* */, the script limit would not apply
> and removing line-ends above would not be needed.
> 
>> -- encrypt the scripts of the stack:
>> set the passkey of this stack to "MyPassword"
>> 
>> To retrieve the data you set the password, get the script, and pass it
>> through base64decode.
> 
> And maybe un-comment, if needed.
> 
> I'd like to hear how this works out.

It worked out much better in a post from April when I slowed down enough to
think about what I was doing. ;)

>From the MC list archives:


on SuckUp
  answer file "Select a file:"
  if it is empty then exit to top
  put url ("binfile:"&it) into s
  put compress(s) into s
  -- Convert to ASCII:
  put base64encode(s) into s
  -- Remove returns:
  replace cr with "<RETURN_PLACEHOLDER>" in s
  set the script of fld 1 to s
end SuckUp

on SpitOut
  ask file "Name new file:"
  if it is empty then exit to top
  put the script of fld 1 into s
  replace "<RETURN_PLACEHOLDER>" with cr in s
  put base64decode(s) into s
  put decompress(s) into s
  set the filetype to "MSIEWAFF" -- I tested with an IE page archive
  put s into url ("binfile:"&it)
end SpitOut


-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc



More information about the use-livecode mailing list