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


Click here to return to the 'Can't get it to work' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Can't get it to work
Authored by: TC!! on Feb 01, '05 11:23:21AM

I couldn't get this to work.
First I got an error because the Recent Items directory didn't exist so I created it.
Now I get this error:
"Finder got an error: Can't continue ."

Script editor highlights the following as being the cause of the error:
file nextItem_path exists
Which is inside create_links

My setup may be different from normal as I have moved my Users directory to a different partition.

Please reply as this will be very useful, I think I would adapt it to create a folder of recent apps as well.



[ Reply to This | # ]
Can't get it to work
Authored by: joshelgin on Feb 01, '05 11:37:00AM

Try this. Replace the "create_links" handler with the following:

[code]
on create_links(item_list, recentItems_folder)
repeat with counter from 1 to (number of items in item_list)
set nextItem to item counter of item_list
set nextItem_path to POSIX file nextItem
try
tell application "Finder"
if file nextItem_path exists then --Make sure the original item is still there
if (file (recentItems_folder & (name of file nextItem_path)) exists) = false then --Make sure the link does not already exist
make new alias file to nextItem_path at alias recentItems_folder with properties {name:name of file nextItem_path}
end if
end if
end tell
end try
end repeat
end create_links
[/code]

I get the "Finder cannot continue" error as well. I don't know what causes it, but it has something to do with the finder checking on a file that actually doesn't exist. It seems that it doesn't like doing it sometimes...



[ Reply to This | # ]