The script, dated 1944, is different from the 1945 pre-release preview version in a number of ways, especially the ending, which called for Carmen to be killed. (This explains why the ending of the film is so confused that we never know for sure who killed Sean Regan: Carmen was supposed to have done it and get punished for it by getting killed, but to keep her alive at the end and not get slapped by the censors, they had to confuse the issue of who did it.) The script was written under Hawks's supervision by three of the writers he worked with most frequently over the years, William Faulkner, Jules Furthman and Leigh Brackett. But this version of the script reads like more of a straightforward mystery thriller. As shooting went on, Hawks and the writers -- I would guess that the rewrites were probably mostly Brackett's; Furthman didn't work on the script after the early drafts and Faulkner wasn't in L.A. much -- kept adding more and more comedy and sex and singing and other digressions; it's like the film noir format wasn't really that interesting to him, so he increasingly started goofing around with it.
And that's pretty clear if you compare the script of the bookstore scene with the filmed version. (In the script, the bookstore scene runs from p. 21 to p. 25.) The first half of the scene is almost exactly what Hawks shot, and, as I said, follows the book almost word for word. The only things Hawks didn't retain in this part of the scene are some bits of business: the script calls for Marlowe to light the proprietress's cigarette, while in the film she's not smoking. In general Hawks stayed away from almost anything that might make Marlowe seem to be too aggressively hitting on this woman, for reasons I'll get too later. Anyway, the first part of the scene is very similar to the original script and the book.
In the original script, the second part of the scene departs from the book by letting Marlowe share a drink and probably a lot more with the attractive bookseller. That's part of what Hawks and his writers were trying to do, give Chandler's chaste Marlowe more of a sex life and make him into a ladies' man. But the scene as originally written is very different from the way it was filmed, because in the script, Marlowe takes the lead in hitting on this woman:, complete with pickup lines. Then after a couple of hours, he leaves her to go off on his case, and she is resigned to his leaving but clearly a little sad that she meant nothing more to him than a quick fling. Here's the 1944 script of this part of the scene:
PROPRIETRESS (returning to her reading): Only if he wore smoked glasses.
MARLOWE (laughing softly, pulling a flat pint from his hip pocket ): I shouldn't think you'd have to work hard to start anything smoking.
He shakes the bottle up and down, invitingly. She looks up at him, searchingly, then smiles slowly.
PROPRIETRESS: It's going to rain, soon.
MARLOWE: I'd rather get wet in here.
She pulls open a drawer and stands two small glasses on the desk. Marlowe smiles, and starts pouring. Through the window behind him the front of Geiger's store can be seen.
INT. BOOKSHOP - NIGHT (RAIN)
It is raining hard outside. The proprietress is a little tight, quite relaxed, and slightly philosophical, leaning against Marlowe, who sits on a stack of Britannicas beside her, watching the window. The proprietress picks up the bottle, which is now empty, shakes it forlornly, and sets it down again.
PROPRIETRESS: A couple of hours, an empty bottle, and so long, pal. That's life.
MARLOWE: But it was a nice two hours.
PROPRIETRESS (sighing): Uh-huh. (Looking toward the window) That's Geiger's car driving up.
MARLOWE: Who's the other guy?
PROPRIETRESS: Damon or Pythias -- I don't know. Geiger's shadow, anyway. Name's Carol Lundgren.
Marlowe has risen, in a hurry to follow Geiger.
MARLOWE: So long, pal.
PROPRIETRESS: If you ever want to buy a book...
MARLOWE: A Ben Hur eighteen-sixty...
PROPRIETRESS (sighing): With duplications... so long.
What Hawks did, partly in the rewrites and partly on the set , was to completely change this part of the scene so that the woman is the one seducing Marlowe, rather than the other way around. In the film, Marlowe is about to go wait in his car when the proprietress gives him Malone's soon-to-be-trademark carnal glance. Only when he realizes that she is coming on to him does he mention that he has a bottle of rye in his pocket. And when he says that, confirming that he's interested, she sashays to the door, pulls down the blind, and ambles back past him, purring "Looks like we're closed for the rest of the afternoon." (Dorothy Malone said in an interview that pulling down the blind was her idea and Hawks let her go with it.) Then comes the famous, and probably semi-improvised, bit where Marlowe wonders aloud if she always has to wear her glasses; she takes off her glasses, lets down her hair and instantly becomes a pinup girl.
Then after the dissolve, instead of Marlowe abandoning her to go off on his case, the woman is the one who breaks it off and reminds Marlowe what his job is supposed to be: "I hate to have to tell you, but that's Geiger's car." As they part, neither of them has any more regrets than the other and when he says "so long, pal," it's not ironic; he means it and she likes it. What was originally written as a scene about what a cool ladies' man Marlowe is becomes a funny/sexy fantasy scene where the woman is in control.
I can't always make up my mind about exactly how great Hawks was (though he is probably one of the most purely entertaining moviemakers of all time; I have a lot of his movies on DVD because they're so re-watchable). This is an example of why I sometimes have doubts about him but usually come back to his side. Looked at logically, this scene is kind of a travesty, as are a lot of scenes in TBS. The original scene as written in the script has sort of a dramatic function. Hawks threw out the dramatic function (mostly, he admitted, because he thought Malone was hot and wanted to give her more to do in the scene; similarly, the character of Carmen changed a lot because of Martha Vickers' hotness) and replaced it with what is essentially a Letter to Penthouse before Penthouse existed: "I never thought this happened to P.I.s like me, but I walked into a used bookstore and met this girl with glasses, who..." It's kind of juvenile, and if any other moviemaker tried to pull something like this, we'd probably call it a hopeless cliché.
But when Hawks does it, it works. I don't fully know why. He was good at getting his actors to act naturally (he encouraged improvisation, and that helped), so you almost buy into what's happening no matter how silly it is, and then too, he was good at getting you involved in a movie in an unexpected way and from an unexpected angle. So we think TBS is going to be a murder mystery, only it's a complete mess as a murder mystery noir story, but it works as something entirely different: a story about an old-fashioned tough guy in the confusing world of wartime America, where the women are empowered and most men on the homefront are objects of contempt for one reason or another. It's not surprising that Hawks was another director the French New Wave was obsessed with: Godard and Truffaut and Demy and the rest were all equally interested in apparently telling genre stories while actually trying to do something different, looser and weirder.