The code shown in the previous response is itself a QTP script.
One way to save QTP scripts into QC is to connect to QC from the QTP UI. You will find that option under the QTP File menu. Once you have made that connection, then in QTP you can use File > Save to manually save scripts into QC.
If the manual method is not a viable method for you, then please provide more details about why that won't work for you.
One way to save QTP scripts into QC is to connect to QC from the QTP UI. You will find that option under the QTP File menu. Once you have made that connection, then in QTP you can use File > Save to manually save scripts into QC.
If the manual method is not a viable method for you, then please provide more details about why that won't work for you.