Re: filtering a list of items with Finder
Re: filtering a list of items with Finder
- Subject: Re: filtering a list of items with Finder
- From: Gakuji Ohtori <email@hidden>
- Date: Tue, 29 Oct 2002 03:56:29 +0900
On 2002.10.28, at 09:57 PM, Paul Skinner wrote:
I can't seem to get the localized kind of the trash with out using the
word 'trash' like I can the localized kind of 'disk'. The finder
doesn't want to resolve the kind of <<class trsh>> in certain syntax
(syntaxi?) and there isn't a path-to entry for trash.
In English:
tell app "Finder" to get kind of trash
--> "Trash"
In Japanese:
tell app "Finder" to get kind of trash
--> "ゴミ箱"
Is 'trash', as a finder object, trans-lingual like 'startup disk'?
Yes, it is. Non-string objects such as class are all trans-lingual. I
hope I understand what you're asking.
Along this multi-ligual line; to me this sounds so difficult. Trying
to get correct performance from scripts that may be run in any of a
dozen or more languages. So many items that may be modified within so
many objects inside so many apps. Some may be carbon, some cocoa.
Auuuggghhh!
But this is not really a problem of AppleScript as a programming
language or development tool but a problem of Finder, isn't it? Things
become complicated and less consistent in AppleScript when you use one
or more applications in your script, but on the other hand, being able
to have multiple applications collaborate is the great advantage of
AppleScript.
Is this even realistic? Why isn't this all just handled
automatically? Isn't that the goal of supporting multiple languages?
I think string properties like kind is intended for composing something
like a message. For example, the following script displays the message
properly in Japanese:
tell application "Finder"
set theItem to item 1 in desktop
set theKind to kind of theItem
set theName to name of theItem
display dialog theName & "は" & theKind & "です。"
-- in English ... theName & " is " & theKind & "."
end
Gaji
_______________________________________________
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.