how to write scripts in QTP?
first of all, by recording, scripts can be automatically generated. other ways include through editing scripts, using step generator, capturing through text check points and through descriptive programming