Getting description/keywords from current open Internet Explorer.

I am writing a favorites/bookmark program. I need to get the description and/or keywords from the current open page of Internet Explorer (as supplied with Windows XP).

I am using Delphi 6. I need the delphi code for this (as a beginner). I am giving 500 points as it is important.

Any help would be appreciated. Thanks.
rincewind666Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rincewind666Author Commented:
By the way, I already know the URL, if that's any help...
0
HypoviaxCommented:
This should be possible as you could temporarily downlaod the HTML open it and view it. I will post an example soon
0
HypoviaxCommented:
To download here is a good example:

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20977025.html

Once downloaded do a search by loading into a richedit control (richedit1.lines.loadfromfile(...))

Then find the required text: an example:

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_10223606.html

Regards,

Hypoviax

0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

rincewind666Author Commented:
I have loaded the following sample html page into richedit1.  What is the delphi 6 code to extract the description into descriptionlabel and the keywords into keywordlabel?  Many thanks for your help.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0023)http://www.lycos.co.uk/ -->
<HTML><HEAD><TITLE>Lycos - meet you there : Picture Search / Chat / Free SMS Messages</TITLE>
<META http-equiv=content-type content="text/html; charset=iso-8859-1">
<META
content="Lycos Search for pictures, chat, free sms messages and all your portal requirements"
name=description>
<META content="Lycos, picture search, chat, free sms messages"
name=keywords><LINK media=all
href="Lycos - meet you there  Pict.....etc.
0
HypoviaxCommented:
Using richedit fintext:

FoundAt := RichEdit1.FindText('"', 0, length(richedit1.length), [stMatchCase]);//find start of description
Endof:=RichEdit1.FindText('"', foundat, length(richedit1.length), [stMatchCase]); //find end


then you can use the copy function to return the text

resultdesc:=copy(richedit1.text,foundat,foundat-endof);

You do the same thing for the keywords:


FoundAtKey := RichEdit1.FindText('"', endof, length(richedit1.length), [stMatchCase]);//find start of keywords
Endofkey:=RichEdit1.FindText('"', foundatkey, length(richedit1.length), [stMatchCase]); //find end


then you can use the copy function to return the text

resultkeywords:=copy(richedit1.text,foundatkey,foundatkey-endofkey);

You may need to fiddle around with it because i did it off the top of my head

Regards,

Hypoviax
0
rincewind666Author Commented:
Sorry Hypoviax, it didn't work - I think because the character appears many times in the code.  Nothing works so far.  Never mind, I am trying another way:

I have copied the entire html page "head" section into a string:  

S := <HEAD><TITLE>Lycos - meet you there : Picture Search / Chat / Free SMS Messages</TITLE><META http-equiv=content-type content="text/html; harset=iso-8859-1"><META content="Lycos Search for pictures, chat, free sms messages and all your portal requirements" name=description><META content="Lycos, picture search, chat, free sms messages" name=keywords><LINK media=all href="Lycos - meet you there  Pict.....etc.

Now I need to get rid of surplus text (<HEAD>, <TITLE>, <META>, etc) - a list of words which will probably always appear in this string. I realize that some words will be missed but as long as I get the words that nearly always appear. To cut down the size of this string, I need to delete these words.  I will have these words in a listbox or stringlist.

I need the delphi 6 code to delete a list of words from a string.  I hope you can help. Many thanks if you can.
0
HypoviaxCommented:
I've been a bit busy, but i can help. if you have time i will be able to post perhaps a complete working version in a couple of days. However have a look here:

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20861127.html

for deleting words from a string
0
Eddie ShipmanAll-around developerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rincewind666Author Commented:
Apologies for the delay, due to personal reasons. Anyway, thanks for the help, everyone.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.