I have a very basic applescript that starts a QuickTime screen recording (or rather opens up the screen recording dialog box in QuickTime):
tell application "QuickTime Player"
new screen recording
end tell
How do I make a second applescript that stops the screen recording and opens up a Save As... dialog box in QuickTime?
This is a simple example of how to accomplish stopping a recording already underway and present the Save... dialog box (note that most if not all versions of QuickTime Player have a Save... option and not Save As...)
The answer to your question is the second tell block but I included the first tell block so that you can run this script as is and see the entire process in action.
The delay in the second tell block is so that the Save... command is not fired before QuickTime Player finishes rendering the screen recording and opening the video in a window, otherwise the Save... dialog box won't appear in the foreground or possibly won't appear at all.
Ideally this script should be developed further to wait until the screen recording has been rendered and opened in a window, rather than using a delay, but it answers your question in the most basic form.