ADC Home > Reference Library > Technical Q&As > Carbon > Interapplication Communication >
|
Q: Is there any way to programmatically deselect icons that were previously selected in the Finder? A: Yes, actually, there are a few different methods you can use. You can deselect all icons that are selected in the Finder by doing the following:
These two methods will deselect ALL icons that are selected in the Finder.
On the other hand, if you only want to deselect the icon for a particular
item, you would need to ask the Finder for the selection, walk through
the list of selected items, remove your item, then set the selection to
the resulting list. Check out the develop issue 20 article "Scripting the Finder From Your Application"
for details on getting and setting the Finder selection. An alternate way of performing the action would be to build an Apple
event procedurally and send the event by calling |
|