write fails

Eric Chatonet eric.chatonet at sosmartsoftware.com
Thu Aug 25 09:18:42 EDT 2005


Hi Jon,

I'm used to another method which works well for me:

put "C:/RHOADS/EEOL2/Logs/log.txt" into tLogFilePath
put the date & " " & the long time & "  " & m into tData
-----
put  url("file:" & tLogFilePath) into tLog
if tLog = empty then put tData into url("file:" & tLogFilePath)
else put tLog & cr & tData into url("file:" & tLogFilePath)

The advantage is that Rev creates the file if it does not exists and  
overwrites the previous file if it already exists.
If you want be compliant with Mac OS, add a fileType setting :-)

Le 25 août 05 à 15:09, Jon a écrit :

> 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.

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list