Pages

2 juin 2008

Write data to a file

on writeFile(theText, thePath, appendData)
try
set thePath to thePath as string
set idFile to open for access file thePath with write permission
if appendData is false then set eof of the idFile to 0
write theText to idFile starting at eof
close access id_file
on error
close access file thePath
return false
end try
end writeFile

>>Ouvrir le script dans l'éditeur

Aucun commentaire: