I'm looking myself for a way to programmatically toggle capslock on Mac, without success so far. But I can assure you, event taps are not the way to go.
Hmm, quite extreme. Anyway, I don't think it's an interesting idea to ask users (from my app) to install such keyboard hack
Back to AppleScript, looks like
Code:
key code
could solve the problem (Help Library > System Events > Processes Suite > key code). The only problem is that I need to know how to use this, AppleScript is not one of my strengths.