Re: Desktop question
Re: Desktop question
- Subject: Re: Desktop question
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 25 Jan 2001 06:24:55 -0500
Right you are. Thanks for paying attention.
So, it still gets the same error.
A workaround for an item on the desktop of any disk is this, of course:
tell application "Finder"
set name of file "test" to "Perm"
end tell
But, interestingly, this also works:
tell application "Finder"
set name of file "Temp" of desktop of disk "MyDisk" to "Perm"
end tell
If you ask for the name of the desktop of disk "MyDisk", you get "Desktop",
not "Desktop Folder":
tell application "Finder"
get name of desktop of disk "MyDisk" --> "Desktop"
end tell
Yet this does not work:
tell application "Finder"
set name of file "Temp" of folder "Desktop" of disk "MyDisk" to "Perm"
end tell
These problems have been known for years and apparently haven't been fixed
in Mac OS 9.1:
<
http://www.AppleScriptSourcebook.com/tips/gotchas//desktopmadness.html>.
on 1/24/01 1:00 PM, John W Baxter at email@hidden wrote:
>
At 14:37 -0500 1/23/01, Bill Cheeseman wrote:
>
> 1. Use Disk Copy to create a new HFS disk on my desktop called "MyDisk"
>
> (this is a convenient way to test non-startup disks when you don't have a
>
> real non-startup disk handy).
>
>
>
> 2. Create a clipping file in the new disk named "Temp".
>
>
>
> 3. Run this script:
>
>
>
> tell application "Finder"
>
> set name of file "Temp" of folder "Desktop Folder" of disk "MyDisk" to
>
> "Perm"
>
> end tell
>
>
>
> It yields the same error message you got (with the different names).
>
>
This exercise looks faulty. For it to work, it would need an added step:
>
>
2a. Drag the clipping file to the desktop.
>
>
Before step 2a, the file isn't in the MyDisk:Desktop Folder: folder. It is
>
in MyDisk:
>
>
Dragging it to the desktop moves it to the Desktop Folder on MyDisk.
>
Finder doesn't help in the Info window, by showing both locations as
>
MyDisk: .
>
>
--John
>
-
Bill Cheeseman, Quechee, Vermont <
mailto:email@hidden>
The AppleScript Sourcebook
<
http://www.AppleScriptSourcebook.com/>
Vermont Recipes-A Cocoa Cookbook
<
http://www.stepwise.com/Articles/VermontRecipes/>