text object question
is it possible to use a specific search path in a read / write message to a text file?
like: "read ....../Desktop/Files/file.txt"
Send "read" or "write" followed my an absolute path, enclosed in "quotes" if it contains spaces, to the [text] object. For example:
read "Macintosh HD:/Users/myname/Desktop/filename.rtf"
write "Macintosh HD:/Users/myname/Finances/lotsamonies.csv"
lh
what if I don't know user name?
let's say I have a patch in applications... I want to write a text file to be placed on desktop, on every computer that runs my patch...
You could try banging [thispatcher] or using javascript to get the location of your patch and then [regexp] the path to find the username and then format the path to the desktop from there. That would work on a mac, as long as your patch was not loaded from somewhere outside of the user's space on the hard drive. I'm not sure about using this method on a windows machine.
Actually on a mac you could just use applescript with Bill Orcutt's [shell] external.
lh
thank you!
hi,
[getpath] for Mac OS X) or [getenv] for Windows
will give you the user paths (and many others).
both externals can be found in my collection here: www.jasch.ch/dl/
hth
/*j