Re: SetVisibleInTiger
Re: SetVisibleInTiger
- Subject: Re: SetVisibleInTiger
- From: Neil Faiman <email@hidden>
- Date: Tue, 2 Aug 2005 07:27:36 -0400
On Aug 1, 2005, at 11:36 PM, DigitEL wrote: Does anyone know if setting the visible of a file is broken in Tiger or am I missing something in the following script that returns 'Stack Overflow' error:
try set theFile to (choose file) set itemInfo to (info for theFile) if (visible of itemInfo) is true then set visible of alias (theFile as string) to false else set visible of alias (the theFile as string) to true end if
"info for" returns a "file information" object. "visible" is a read-only property of the "file information" object returned by the "info for" command. You can't "set visible of alias (theFile as string)" because (1) "alias (theFile as string)" is just an AppleScript alias, which doesn't have a "visible" property, and (2) the properties of a "file information" object are read-only.
Presumably, you would have to set the visibility property of a file through the Finder, which is the application that manipulates file properties; but "items" and "files" don't have a visibility property in the Finder, so you appear to be out of luck.
Regards,
Neil Faiman
"in |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden