Delphi - Grab the source of a webpage running in firefox
How can I get the source of a webpage that is currently running in an instance of firefox using 开发者_高级运维delphi ? I would like to do this without making firefox the active window first if that is possible but just grabbing the source is my primary question.
TIA, Dave
This might help
How to embed a browser object, other than IE<n>, in a Delphi application
This is about embedding firefox (amongst others) but has lnks to other pages that shows methods that you can navigate the DOM with.
I'd look at using IE if possible it's fairly well documented how to do this in IE.
Obligatory "here's one way, but don't do it" from the ClipBoard guy....
One ugly hack I've seen is to send keystrokes to the app and force it to copy/paste the data to the clipboard. Don't go down this road. It will work, for you, in a controlled environment. It won't work for your users, who will experience compatibility issues, unexpected trashing of their clipboard data, and crashes from other apps that are monitoring the clipboard for updates.
And no, you cannot save/restore the clipboard without causing even more trouble.
精彩评论