Before creating a new thread in this Forum I recommend using the Forum search feature first to see if you query has already been raised and answered. If you searcy for putty you will get a few results.
Here is a copy of an answer I gave on another Putty thread:
Putty is a feeware application, and as such it does not have any API connectors that can be used to interface with it. Your only option therefore is Surface Automation techniques, I recommend you read the Surface Automation of Mainframe Emulators guide in the learning area of the portal for some advice on how you might approach this.
A better solution would be to use an Enterprise class terminal emulator that adheres to the hllapi API standards. Many terminal emulators also have telnet/http functionality, but because they are enterprise rather than freeware they adhere to interface standards.