tell application "TextEdit"
    activate
    make new document
    set text of front document to "hello world"
end tell