binaryEncode question
Klaus Major
k_major at osnabrueck.netsurf.de
Sat May 4 07:09:01 EDT 2002
Hi Kurt and Dar and all :-)
> Thanks to Jeanne DeVoto for her suggestion. Which brings me to my next
> question (I hope I'm not asking too many!) as to why the following
> script leaves me with an empty (0 bytes) new file (global gBinData
> contains binary data converted from entered Hex bytes using the
> binaryEncode function, but I can't get this to work with plain text,
> either):
>
> on mouseup
> global gBinData
> ask file "enter name of file"
> put it into newFile
> open file newFile for binary write
> write gBinData to file newFile
> end mouseup
>
> None of the other permutations I tried have worked. I'm sure I need a
> dope slap, here. :-)
>
> Any help appreciated!
> -Kurt
there is an even shorter way to write somthing to a file.
...and there is no way to forget to close that file ;-)
on mouseup
global gBinData
ask file "enter name of file"
put it into newFile
put gBinData into url("binfile:" & newFile)
end mouseup
or use "file:" if it is (ascii-) text-data.
Regards
Klaus Major
k_major at osnabrueck.netsurf.de
More information about the use-livecode
mailing list