Image copyright TIFF Image caption Jessica Chastain and Idris Elba star in Molly's Game

You might not have heard of Aaron Sorkin, but we're pretty sure you'll know his work.

As the writer behind The Social Network, The West Wing, The Newsroom and countless other films, plays and TV shows, he's now considered one of Hollywood's most loved and respected screenwriters.

But while his CV speaks for itself, Sorkin is now turning his hand to directing for the first time.

His new film Molly's Game, which stars Jessica Chastain and Idris Elba, had its world premiere at the Toronto Film Festival on Friday night.

The film tells the real-life story of Molly Bloom - a woman who set up exclusive high-stakes poker games for an underground network of film stars and business tycoons.

While he was in town, Sorkin discussed his long career in entertainment and offered some tips to aspiring screenwriters:

1. A technical knowledge of film isn't necessarily necessary

"When I did A Few Good Men, at that point, not only had I never written a screenplay, I'd never read a screenplay," Sorkin said.

"I loved movies as much as everyone, but whereas my friends can tell you who the second assistant director was on every Hitchcock film, and can talk with great sophistication about the films that I love, I'm not able to do that."

Image copyright Getty Images Image caption Sorkin attended the world premiere of Molly's Game with his daughter Roxy

To help him get his head around writing, Sorkin says he bought a screenplay formatting book, but added: "After about three days I threw it out the window, because I just thought: 'This can't be right'."

Instead of format-intensive books with high levels of technical detail, Sorkin credits Adventures in the Screen Trade by William Goldman with teaching him the basics.

"Bill did away with unnecessary stuff... I clung to the Bill Goldman version of writing a screenplay," he said.

2. Writer's block doesn't last forever

"[When I write], if the only thing that holding me back is the speed at which I type, it's going well," Sorkin said.

"But if it's coming out like molasses, you shouldn't sit there trying to think of the next line. I get in my car, drive around, listen to music. I'll watch sports.

"Writer's block is not a condition that lasts forever, it only feels like it's going to last forever."

Image copyright TIFF Image caption The world premiere Molly's Game was held in Toronto on Friday night

3. Film gives you the luxury of time (unlike TV)

Sorkin's television credits include Sports Night and Studio 60, but more recently he's turned to writing for the big screen, with films like Steve Jobs, The Social Network and now Molly's Game.

"The difference between writing for television and writing movies is time," he said.

"If I'm working on a screenplay and I've run into trouble, and it's not working, I can call the studio or producer and say 'I know I said I was going to deliver in August, it's probably going to be more like October or November'. Generally they're understanding.

"With an episode of television, you have a concrete deadline, you have an air date you have to meet. The downside of TV is you have to write even when you're not writing well."

4. Audiences like things which are set 'behind the scenes'

Sorkin fans know that he is never more comfortable than when writing about what goes on behind the scenes of something - be it a news room, the invention of Facebook... or the White House.

"The West Wing was a show about the five minutes before and after what we see on CNN," he said.

Image copyright Getty Images Image caption Aaron Sorkin wrote four of The West Wing's seven seasons

"Everything to some extent is a behind the scenes story, whether it's behind the scenes at a hospital, a law firm, a police precinct, or a family. Everything [I write] is meant to be the part that we don't see in the store window.

"I guess my way of feeling like a journalist, lawyer or politician is by writing about them."

5. Carrie Fisher gave him some important advice

"For about 10 years I was a drug addict," Sorkin explained. "I have 18 years clean now, because I went to the Hazelden centre in Minnesota and got cleaned up.

"And before I went, I got call from someone I'd never met before, Carrie Fisher, who called me out of the blue and said 'I know you think you're not going to be able to write as well without drugs, I promise you you're going to write better', and she was 100% right."

Image copyright Getty Images Image caption Sorkin said Jessica Chastain was his "first choice" to play Molly Bloom

6. Screenwriters *can* be directors too

"I didn't write the screenplay for Molly's Game with the intention of directing, but from the moment I started thinking about it, I knew that there were dozens of very attractive ways to do Molly's Game... I'm trying to think of another word for 'wrong'," Sorkin laughs.

"There were a lot of shiny objects in the film - the money, the glamour, the movie stars, the decadence, the sexiness, and that wasn't the movie that I was seeing. Those things would be background extras in this movie.

"In this particular case I just felt very strongly about the tone of the film, what was important in this story, the fact that this wasn't a poker movie. This was a movie with poker in it."

7. A bad casting decision can hinder an entire project

"Someone once said casting is 90% of the battle. I think that's dramatically underestimating its importance," Sorkin said.

"If you cast something wrong, you'll spend the rest of your time dealing with the fact that you've cast that part incorrectly. And it's not at all the actor's fault."

Referring to Molly's Game, Sorkin joked: "Jessica was cast beautifully, I was super smart to make that decision. I can't give myself enough credit."

Image copyright TIFF Image caption Michael Cera, Kevin Costner and Chris O'Dowd (pictured) also star in Molly's Game

He went on to name several actors he's worked with whose delivery of dialogue he particularly admires.

"Allison Janney, Felicity Huffman, Bradley Whitford, Richard Schiff, Jeff Daniels, the entire cast of The Social Network, they've all been great.

"And, most recently, the cast of Molly's Game. Jessica straps this movie to her back in the first scene and does not let go of it until the credits roll at the end."

Read more from the festival:

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.