The Hollywood screenwriter behind such projects as "The West Wing" and "The Social Network" revealed he suffered from a stroke that he says nearly killed him last year.