Re: Invisibles
Re: Invisibles
- Subject: Re: Invisibles
- From: Luther Fuller <email@hidden>
- Date: Wed, 14 Oct 2009 16:45:15 -0500
It seems the secret to invisible files is to avoid the Finder except for a few commands that will work with them. 'duplicate' will not work, but 'make new ...' will work.
I wanted to create certain items, but only if they did not already exist. Asking the Finder ...
if not (exists folder invisFolderName of sourceFolder) then make new folder at sourceFolder with properties {name:invisFolderName}
will NOT work. So I used this to get what I needed ...
try set invisFolder to ((sourceFolder as text) & invisFolderName) as alias on error set invisFolder to (make new folder at sourceFolder with properties {name:invisFolderName}) as alias end try try ((invisFolder as text) & aliasFileName) as alias on error make new alias file at invisFolder to destFolder with properties {name:aliasFileName} end try
I've also noticed that 'make new ...' seems not to return an alias. I was under the impression that it did, but I've found that I now have to put '... as alias' after the 'make new ...' command to make scripts work right. Has something changed or is my memory defective? I will look further into this.
|
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden