write fails

Lynch, Jonathan bnz2 at cdc.gov
Thu Aug 25 09:34:53 EDT 2005


I never use open, write, close...

I did at first, but it just never occurs that I need to do it that way.

The put URL and put into URL methods are so much easier.

If you have a file named "C:/my documents/my feet stink.txt" then you
would address it like this (in Windows):

Put "file:C:/my documents/my feet stink.txt" into tFileURL
Put URL tFileURL into tMyText
-- do whatever you need to do with the text
Put tMyNewText into URL tFileURL


Now, if you are using binary data, in other words you need to make sure
Revolution does not automatically change end of line markers to its own
format, then put "binfile:" in front of the file path rather than
"file:"



-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Pat
Trendler
Sent: Thursday, August 25, 2005 9:29 AM
To: How to use Revolution
Subject: Re: write fails

Jon,

I think you need to "open file" before writing to it, or, alternatively
use 
the "put URL"

See the docs for detail.

Pat
patrend at bigpond.com

----- Original Message ----- 
From: "Jon" <jbondy at sover.net>
To: "Revolution List" <use-revolution at lists.runrev.com>
Sent: Thursday, August 25, 2005 11:09 PM
Subject: write fails


> I'm trying to log activity to a file with what I thought was a simple 
> approach:
>
> put the date & " " & the long time & "  " & m & Return into s
> write s to file "C:/RHOADS/EEOL2/Logs/log.txt" at end
>
> The file is not created automatically; after creating the file
manually, 
> the file remains empty; the path was copy-and-pasted from Windows 
> Explorer, so I know it is correct; the string "s" has reasonable
contents 
> as verified with the Variable Watcher; and there are no run-time
errors.
>
> Any thoughts?
>
> :)
>
> Jon
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.15/81 - Release Date:
24/08/2005
>
> 

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




More information about the use-livecode mailing list