Needed also today and wrote this script which works fine.
Check out the fileXtra3 xtra in combination with the Fileio xtra.
Example script
on mouseUp
writetoFile
end
on writetoFile
global myFile
if ObjectP(myFile) then set myFile = 0
set theFile = the text of field "myfield"
set myfile =new(xtra"fileio")
fxObj = xtra("fileXtra3").new()
if the platform contains "Windows, 32" then
set path = fx_FolderGetSpecialPath(fxObj, CSIDL_COMMON_DESKTOPDIRECTORY)
else
set path = fx_FolderGetSpecialPath(fxObj, kDesktopFolderType)
end if
if path = "" then
alert "no pathname"
else
createFile (myFile, path& "textfile.txt")
openfile (myfile, path& "textfile.txt", 0)
setfinderinfo(myfile, "TEXT ttxt") --only for macintosh
writestring (myfile, thefile)
alert "status: "&error(myfile, status(myfile))
end if
closeFile (myFile)
set myFile = 0
end
Tom Vandenbossche
-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens
Chris Couldridge
Verzonden: donderdag 8 februari 2001 15:05
Aan: [EMAIL PROTECTED]
Onderwerp: <lingo-l> finding the desktop path
Hi all,
just a quick (and hopefully easy) one. Is there a function like getos
directory to find the path to the desktop folder? I've searched and can't
seem to find anything. I want to copy a file off a CD to the desktop
without
opening a dialogue box
thanks in advance
Chris Couldridge
[EMAIL PROTECTED]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]