Leigh Chapman, the 1960s actress-turned-screenwriter who wrote “Dirty Mary, Crazy Larry” and “The Octagon,” died Tuesday, Nov. 4 at her West Hollywood home, after an eight-month battle with cancer. She was 75.

Chapman was familiar to TV viewers as Sarah, Napoleon Solo’s efficient secretary in several 1965 episodes of “The Man From U.N.C.L.E.” She also did guest shots on several other mid-’60s series including “Combat,” “Dr. Kildare,” “McHale’s Navy” and “The Monkees.”

But she found her calling as a scriptwriter, starting in TV with “Burke’s Law,” “Mission: Impossible,” “It Takes a Thief,” “The Mod Squad” and “My Favorite Martian.” She penned six scripts for “The Wild Wild West,” one of which earned Agnes Moorehead her only acting Emmy.

Chapman soon graduated to feature-film work, mostly – and unusually for a female writer in the ’70s – in the action-adventure genre, notably with the Peter Fonda car-chase film “Dirty Mary, Crazy Larry.”

Subsequent writing credits included “Steel,” “Boardwalk,” “King of the Mountain,” “Impulse” and the Chuck Norris film “The Octagon.” She did uncredited work on “All the Marbles” and wrote the original treatment that eventually became the Isaac Hayes blaxploitation film “Truck Turner.”

Her final writing credits were the 1993 pilot for “Walker, Texas Ranger” and another first-season episode of the Chuck Norris series, although a creative dispute led her to substitute her mother’s name (Louise McCarn) in the credits for both.

She was born Rosa Lee Chapman in Kannapolis, N.C., in 1939, graduated from Winthrop College in Rock Hill, S.C., and moved to L.A. in the early 1960s, where her first job, as a secretary at the William Morris agency, led to the acting gigs; eventually the agency represented her as a writer.

In later years she took up underwater photography and her work was featured in a 2011 exhibit at Calumet Photography in Hollywood.

Survivors include two sisters and a brother.