Insert text (eg in AppleScript Editor)

Is there any better way than:

set x to "something"

tell application "AppleScript Editor"
	set contents of selection of document 1 to x
end tell

tell application "System Events"
	key code 124
end tell

This seems to work:

set x to "something"

tell application "AppleScript Editor"
	tell document 1
		set contents of selection to x
		set selectionRange to character range of selection
		set selection to insertion point ((end of selectionRange) + 1) -- 'insertion point after character .' doesn't work.
	end tell
end tell