Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Make complex Finder selections with glob patterns' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make complex Finder selections with glob patterns
Authored by: aqsalter on Mar 13, '08 03:37:17AM
I found that this script did not work for me on Leopard if the file selected was not a folder... i got an error "Can't make alias "Powerbook:Users:xxxx:my_file.txt" into type folder."
in order to fix it I changed the following lines:
if not (exists folder pwdAlias) then
	set pwdAlias to (container of pwdAlias) as alias
end if
to:
-- this should work, but doesn't
--set {isFolder, fName} to {folder, name} of (info for pwdAlias)
-- hack
try
	get folder pwdAlias
	set isFolder to true
on error
	set isFolder to false
end try
if not (isFolder) then
	set pwdAlias to (container of pwdAlias) as alias
end if

Hope that helps somebody.


[ Reply to This | # ]