Ask dialog and write file to disc

Klaus kmajor at metascape.org
Thu Jan 24 06:29:01 EST 2002


Hi Magnus,

> Recently, Magnus von Brömsen wrote:
> 
>> So, can anybody tell me what is wrong with this script:
>> 
>> on mouseUp 
>> ask file "Save your order" with "Untitled.txt"
>> if it is empty then exit mouseUp
>> open it 
>> write field "totalOrder" to file it
>> end mouseUp 
> 
> Looks like you're missing a line to finish the write command.  Try this:
> 
> open file it 
> write field "totalOrder" to file it
> close file it
> 
> Regards,
> 
> Scott Rossi
> Creative Director

you can have it even shorter ;-)

on mouseUp 
    ask file "Save your order" with "Untitled.txt"
    if it is empty then exit mouseUp
    put field "totalOrder" into url ("file:" & it)  ## !!!
end mouseUp 

Regards

Klaus Major <kmajor at metascape.org>
MetaScape GmbH


"Watch out where the huskies go, and don't you eat that yellow snow !"
Frank Zappa, "Nanook rubs it" ;-)




More information about the use-livecode mailing list