All users desktop? Path to?

Hi, can anyone tell me how can open a file from any user’s desktop? I need to create a script that will work within a multi-user/workstation envionment

In windows i would specify %userprofile%/desktop… but how do i do this using applescript?
so far i have:

tell application “textedit”
open file "Macintosh HD:Users:gboyle:desktop:file.txt
end tell

Surely there must be a way to open path to current user desktop or something???

Thanks for any help! :slight_smile:

If you use the Finder to make the file a variable, the Desktop is implied, so you won’t need to specify a location:

tell application "Finder" to set myFile to file "file.txt" as alias
tell application "TextEdit"
	open myFile
end tell

Or, without the Finder:

alias ((path to desktop folder from user domain as text) & "file.txt")

Thanks for your help - i will give it a try!