typing with applescript

hi- i’m new to applescript (about 10 minutes ago to be precise)

i need a script to type a line of text in whatever application is currently active, whenever its run

can anyone help?

thanks in advance

(requires Panther)

tell app "System Events"
     tell process "whatever application is currently active"
          set frontmost to true
          keystroke "Hello there"
     end
end

Or try Kanzu’s Extra Suites:

ES type string "whatever" with use clipboard