Ask dialog and write file to disc

Klaus kmajor at metascape.org
Thu Jan 24 08:27:01 EST 2002


Hi Magnus,


> Many thanks!
> Works great now. (I had missed "file" in Open & Close.)

>> 
>> 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
>> 
> I'm new to Revolution (my first project). So, that combination
> of (" "&), is it replaced by the actual name of the file?.
> 
> /magnus

Yes, kind of...

the url command needs a complete string as an argument.

So the correct syntax would be:

put fld 1 into url "file:Your_complete/path_to_the/file.txt"

So the actual filepath and the "file:" have to be concenated first,
that's what the parenthesis are for.

(The & (ampersand) concatenates 2 strings.)

If you leave them, there will be an error.


Regards

Klaus Major <kmajor at metascape.org>
MetaScape GmbH





More information about the use-livecode mailing list