[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Getting the name of the file which has been <EMBED> in Internet Explorer so it can be opened by an associated ActiveForm?

Posted on 2003-10-21
7
Medium Priority
?
242 Views
Last Modified: 2010-04-05
I have created an ActiveForm in Delphi6 for displaying Tiff Images.  I need the ActiveForm to load a tiff file when it is <Embed> in a Html Page, for example:

<EMBED src=&#8221;[Filename].tiff&#8221; width=100 height=100>

I&#8217;ve got the ActiveForm to load up when you embed a tiff file into the html page, but I cannot access or extract the tiff filename from the < EMBED> tab.
0
Comment
Question by:StayGreedy
  • 2
  • 2
5 Comments
 

Accepted Solution

by:
waldude earned 120 total points
ID: 9597273
Have you tried reading the file into a text field or string, and doing something like: AnsiPos('<EMBED', htmlstring); That would give you the position in the string <EMBED is located, then add some spaces to account for the file name, use the copy function to grab it.

Some more complicated, but more powerfull are regular expressions.

http://www.latiumsoftware.com/en/articles/00009.php
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56reconIntroductionToRegularExpressions.asp

You can use regular expressions to search for parts of text surrounding the text you are after.

Good luck,
Brandon  
0
 
LVL 26

Assisted Solution

by:EddieShipman
EddieShipman earned 120 total points
ID: 9603898
Try this:

var
 ovEmbed: OleVariant;
begin
 ovEmbed := WebBrowser1.OleObject.Document.all.tags('EMBED');
 Memo1.Lines.Add(ovEmbed.src);
end;

0
 
LVL 1

Author Comment

by:StayGreedy
ID: 9613321
I would like to delete this question, so that I can re-phrase it as the answers I am getting do not solve my problem.

Thank you for your answers, but they don't solve my problem.  However, they are good answer, that I will most likely find use for in future projects.  And for your effort I would like to reward you both 30 Points.  

Cheers.

Russell

0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9613688
no problem here...
0
 

Expert Comment

by:waldude
ID: 9614213
Sounds fine to me.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question