Re: Problems with *path* specifications under Mac OS Xs
Re: Problems with *path* specifications under Mac OS Xs
- Subject: Re: Problems with *path* specifications under Mac OS Xs
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 19 Jul 2003 07:29:34 -0700
If you are using the path format then you must include a colon after a
folder:
tell app "Finder"
exists folder "Produccis:Scripts:"
end tell
So in your original formulation where you make the folder's name (without
colon) a property (I can hardly bring myself to type 'exists of' since it's
awful English, but here goes):
property MyDisk : "Products"
property MyFolder : Scripts"
tell application "Finder"
exists of disk MyDisk
exists of folder MyFolder of disk MyDisk
exists of folder (MyDisk & ":" & MyFolder & ":")
end tell
In OS 9, the Finder was kind enough to coerce it for you. (I would have
called that a bug but other people would have shouted at me for saying so.
The Finder bends over backwards to be kind, so you never learn the right way
of doing things.)
Probably the reason why things have to be more rigorous in OS X has to do
with all the changes they've made to the file system, packages, Unicode
paths or something. Or maybe they just omitted to add in the coercion. This
coercion still works without the colon:
exists of item (MyDisk & ":" & MyFolder)
--
Paul Berkowitz
>
From: Joan Sanchez Sabi - interempresas <email@hidden>
>
Reply-To: <email@hidden>
>
Date: Sat, 19 Jul 2003 15:31:04 +0200
>
To: <email@hidden>
>
Subject: Problems with *path* specifications under Mac OS Xs
>
>
If I use the following script
>
>
property MyDisk : "Produccis"
>
property MyFolder : "Scripts"
>
>
tell application "Finder"
>
exists of disk MyDisk
>
exists of folder MyFolder of disk MyDisk
>
exists of folder (MyDisk & ":" & MyFolder)
>
end tell
>
>
------
>
>
and execute it under Mac OS X 10.2.6 (AppleScript E1-1.9 (Spanish)), I get
>
the following results:
>
>
tell application "Finder"
>
exists disk "Produccis"
>
--> true
>
exists folder "Scripts" of disk "Produccis"
>
--> true
>
exists folder "Produccis:Scripts"
>
--> false
>
end tell
>
>
------
>
>
if I execute it then under Mac OS 9.2.1 (AppleScript E1-1.6 (Spanish)), I
>
get "what I am accustomed to"
>
>
>
tell application "Finder"
>
exists disk "Produccis"
>
--> true
>
exists folder "Scripts" of disk "Produccis"
>
--> true
>
exists folder "Produccis:Scripts"
>
--> true
>
end tell
>
>
------
>
Can anyone tell me why the Finder of Mac OS X does not find the folder when
>
you specify it by its "path"?
>
>
I seem to have a similar problem when telling FileMaker 6 to "set cell xxx
>
to file yyy" (it worked with Mac OS 9, it doesn't with Mac OS X).
>
>
Thanks
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.