Title: Re: Get  subscribed news groups?
On 9/21/02 12:52 AM, "George Clark" <[EMAIL PROTECTED]> wrote:

> What's selected in the folder list is the news server I supplied, as
> expected, and in the list of news groups only the groups to which I'm
> subscribed are bolded. Selecting 'Subscribed only' shows only those news
> groups to which I'm currently subscribed. It's this that doesn't work as I'd
> expect:
>
>   name of every news group -- no server just uses default
>
> Try this, if you would please, Paul: go to the news group list for one of
> your news servers, and double-click on a news group to which you are not
> now, and never have been, subscribed (OK, if you insist...go ahead and see
> what's in that warez group <G>). Maybe look at a message or two--I don't
> know if that step is necessary, or if just opening the news group's window
> is sufficient.
>
> Now try the above script specifying that news server--do you see the news
> group you just viewed in the list? If not, then something is screwy on my
> system. If you do, then either this is a bug or a feature; I'm not sure
> which.

Yes, what you discovered is a bad bug. 18 newsgroups I'm not subscribed to showed up along with the 18 I am subscribed to: they're ones I visited briefly once or twice, as you say. But you misunderstood me - I believed you, but I wanted you to try the unsubscribed newsgroups one at a time, to see if they show up in the main window. They don't ( I just checked) - it just reverts to "On My Computer" or doesn't change. (If it's already at "On My Computer" it errors, otherwise that's where it goes - folder id 7.) So that provides an error check.

Here's  a _very_ clunky workaround that gets just your subscribed newsgroup names. (It also downloads your quota of headers to every subscribed newsgroups with dozens of "New Mail" alerts going off.)

tell application "Microsoft Entourage"
    set subscribedNames to {}
    set allNames to name of every news group of news server "Microsoft News Server"
    repeat with i from 1 to (count allNames)
        set theName to item i of allNames
        set theNewsGroup to news group theName of news server "Microsoft News Server"
        try -- some can't do it
            set displayed feature of main window to theNewsGroup
        end try
        if displayed feature of main window = theNewsGroup then
            set end of subscribedNames to theName
        end if -- unsubscribed ones don't show up
    end repeat
    subscribedNames
end tell



--
Paul Berkowitz

Reply via email to