Hi,

You can do it programatically using AppleScript - but it is a bit
nasty.

Best regards

Alan Shouls

// This is the only way that I have found that will acctually add a
mount to the finder side-bar
// This code is based on technote tn2006, 
http://www.peachpit.com/articles/article.aspx?p=1313994
// and http://forums.macosxhints.com/showthread.php?t=78583
#if 1
        NSString *theScript = [NSString stringWithFormat:
                        @"try\n"
                         "      tell application \"Finder\"\n"
                         "              activate\n"
                         "              delay 1.5\n" // or the select attempt 
occurs too soon
                         "              select the disk named \"%...@\"\n"
                         "              tell application \"System Events\" to 
tell process \"Finder\"
to keystroke \"t\" using command down\n" // puts folder in sidebar
                         "      end tell\n"
                         "end try\n", name];

    NSDictionary* errorDict;
    NSAppleEventDescriptor* returnDescriptor = NULL;

        NSAppleScript* scriptObject = [[NSAppleScript alloc]
initWithSource:theScript];
    returnDescriptor = [scriptObject executeAndReturnError:
&errorDict];
    [scriptObject release];

        return returnDescriptor != NULL;
#endif


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to