• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: label color disapears
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: label color disapears


  • Subject: Re: label color disapears
  • From: Peter Waibel <email@hidden>
  • Date: Thu, 15 Feb 2007 20:33:33 +0100

Am 15.02.2007 um 19:11 schrieb Steven D. Majewski:

On Feb 14, 2007, at 7:22 AM, Peter Waibel wrote:

Hi all,

I have a folder containing files, folders and aliases.
I can select all of them and apply a label color using the finder.

When I try to apply the label color using applescript

tell application "Finder"
	set label index of every item of folder "my:folder:" to 2
end tell

the result seems to be correct. All items have the label color applied.
But as soon as I select one of those aliases the label color disapears!


The label color disapears only on aliases that were created
using the unix command "ln -fhs "

Does someone know how to solve this problem?
(Mac OS X 10.4.8)



I don't know how to solve the problem, but:

[1] It's likely not an applescript problem, because the same thing happens
if you do it manually from the Finder.
On my Mac OS X 10.4.8 I can apply labels to a symbolic-link-alias and the label does not disapear!
So, at least this way the Finder can handle labels aplied to a symbolic-link-alias.
The label only disapears if they are aplied via applescript to a symbolic-link-alias.



[2] I was about to say that files created with "ln -fhs" are not aliases ...
however, I see that 'get info' now calls them aliases. Well, despite
that: Mac aliases and unix symbolic links are really two different things,
and they behave differently in Mac (Applescript|Finder) or Unix (command-line)
environments. Unix commands usually don't know how to handle Mac aliases.
The Mac environment does a slightly better, but incomplete job, of handling
symbolic links.
Well, I had to find a faster way to to create aliases in one of my script.
So I tried the unix command "ln -fhs".
It's at least 10 times fasten than creating Finder aliases.


Ok, so the question is: Is a symbolic-link-alias a valid Finder item?
If it is a valid item then it should behave like a valid Finder item.
If a symlink-alias is not a valid Finder item, then it should not show up in the Finder.



So: I don't know how to fix the problem, but it's not surprising that it doesn't work.
It is a little surprising though, HOW it doesn't work: I would have guessed that if
the link didn't take the label color, then the liked-to file might get the change,
but neither file seems to show the label change. That seems a bit odd -- I expected
one or the other.

Steven, many thanks for your detailed reply

Peter


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: label color disapears
      • From: Doug McNutt <email@hidden>
References: 
 >label color disapears (From: Peter Waibel <email@hidden>)
 >Re: label color disapears (From: "Steven D. Majewski" <email@hidden>)

  • Prev by Date: Re: label color disapears
  • Next by Date: Re: label color disapears
  • Previous by thread: Re: label color disapears
  • Next by thread: Re: label color disapears
  • Index(es):
    • Date
    • Thread