Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
This site is full of examples and documents (check out the "Documents" tab) to help you. There is also the official docs on Cisco.com at http://www.cisco.com/en/US/docs/ios/netmgmt/configuration/guide/nm_eem_policy_tcl.html . You can also look at the Cisco Press book TcL Scripting for Cisco IOS that includes material about EEM-specific Tcl scripting.