Complex sentence: Shatner did not expect "Star Trek" to become a success; when "Star Trek" was cancelled in 1969, Shatner assumed it would be the end of his association with the show.
Split into simpler sentences: Shatner did not expect "Star Trek" to become a success. When "Star Trek" was cancelled in 1969, Shatner assumed it would be the end of his association with the show.