#=====(*
Handler borrowed to Regulus6633 - http://macscripter.net/viewtopic.php?id=36861
*)on writeto(targetFile, theData, dataType, apendData)-- targetFile is the path to the file you want to write-- theData is the data you want in the file.-- dataType is the data type of theData and it can be text, list, record etc.-- apendData is true to append theData to the end of the current contents of the file or false to overwrite ittryset targetFile to targetFile as «class furl»set openFile to open for access targetFile with write permissionifnot apendData thenset eof of openFile to 0
write theData to openFile starting at eof as dataType
close access openFilereturn trueonerrortry
close access targetFileendtryreturn falseendtryend writeto