MACSCRPT Archives

October 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Stockly, Ed" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 23 Oct 2007 10:33:56 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
> On Oct 22, 2007, at 18:22, Levon Spradlin wrote:
> 
>> Am I doing something wrong?
>> 
>> tell application "Finder"
>>     set theDesktop to path to desktop as Unicode text
>> end tell
>> 
>> Finder got an error: Can't make desktop into type constant.
>> 

Try this:
 
tell application "Finder"
    set myDesktop to desktop as Unicode text
end tell

Or, outside a "Finder" tell, try this:

set theDesktop to path to desktop as Unicode text

Or this

set theDesktop to path to "desk" as Unicode text


I'm not sure why 

Path to "Desk" as unicode text

works, but it seems to. I wouldn't recommend "path to" inside a Finder tell,
especially when it's not needed.

HTH,

ES

ATOM RSS1 RSS2