getting page source direct from safari and not shell

im trying to get the source of a webpage from safari… and im trying to do it without using the shell as when it the page source differs from what is actually displayed… is there any way to copy the source of the page to either the clipboard or to something like BBedit or text edit?

Hi,

Basically, something like this:


tell application "Safari"
	set the_html to source of front document
end tell
tell application "TextEdit"
	launch
	activate
	make new document at front with properties {text:the_html}
end tell

You can add a lot of stuff including error checking, javascript, titles, etc.

gl,

thanking you for your help :D:D worked a charm !